IEEE.org     |     IEEE Xplore Digital Library     |     IEEE Standards     |     IEEE Spectrum     |     More Sites

Commit 8c154a76 authored by exw4141's avatar exw4141
Browse files

Created docs for CSV endpoint and parts of the schema

parent 85d1c869
{
"/csv": {
"put": {
"requestBody": {
"description": "",
"content": {
"application/vnd.ms-excel": {
"schema": {
"$ref": "#/components/schema/asset_property"
},
"examples": {
"import-csv-example": {
"summary": "Importing data with a valid CSV",
"description": "CSV containing data to be stored",
"value": {
"asset_type_id": "3",
"csv": "fire.csv"
}
}
}
}
}
}
}
}
}
{
"Asset": {
"type": "object",
"required": [
"id",
"project_id",
"asset_type_id"
],
"properties": {
"id": {
"type": "bigint",
"description": "the ID of the asset"
},
"project_id": {
"type": "integer",
"description": "the ID of the project tracking the asset"
},
"asset_type_id": {
"type": "integer",
"description": "the ID of the asset type that the asset belongs to"
},
"location": {
"type": "geometry",
"description": "the location of the asset"
}
}
}
}
{
"Asset Property": {
"type": "object",
"required": [
"asset_id",
"property_id"
],
"properties": {
"asset_id": {
"type": "bigint",
"description": "The asset associated with the property"
},
"property_id": {
"type": "integer",
"description": "The property the asset possesses"
},
"value": {
"type": "string",
"description": "Value of the property for a particular asset"
}
}
}
}
{
"Property": {
"type": "object",
"required": [
"id",
"asset_type_id",
"data_type"
],
"properties": {
"id": {
"type": "integer",
"description": "the unique ID of the property"
},
"asset_type_id": {
"type": "integer",
"description": "the ID of the asset type possessing the property"
},
"data_type": {
"type": "string",
"description": "the data type of the information that the property tracks"
},
"name": {
"type": "string",
"description": "the name of the property"
},
"required": {
"type": "boolean",
"description": "tell whether the property is required to be stored for all assets possessing the property"
},
"is_private": {
"type": "boolean",
"description": "tell whether this property should be private from the general public"
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment