Skip to content

Instantly share code, notes, and snippets.

@mgenov
Created November 11, 2015 09:43
Show Gist options
  • Save mgenov/c36babdcf12996a367e9 to your computer and use it in GitHub Desktop.
Save mgenov/c36babdcf12996a367e9 to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"title": "TNG API",
"description": "Move your app forward with the TNG API",
"version": "1.0.0"
},
"host": "mtel.telcong.com",
"schemes": [
"https"
],
"basePath": "/api/v1",
"produces": [
"application/json"
],
"paths": {
"/locations": {
"post": {
"summary": "Car Locations",
"description": "The Car Locations endpoint collects information from external systems. \n",
"parameters": [
{
"name": "locations",
"in": "query",
"description": "Latitude component of location.",
"required": true,
"type": "array",
"items": {
"$ref": "#/definitions/Location"
},
"format": "double"
}
],
"tags": [
"Car Locations"
],
"responses": {
"200": {
"description": "All locations are registered successfully",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/Location"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Location": {
"type": "object",
"properties": {
"carId": {
"type": "string",
"description": "Unique registration number representing a specific vehicle identifier. For example, each vehicle registered in any Country has uniqueue registration number which is provided here."
},
"lat": {
"type": "number",
"format": "double",
"description": "Latitude"
},
"lng": {
"type": "number",
"format": "double",
"description": "Longitude"
},
"speed": {
"type": "number",
"format": "double",
"description": "Speed of vehicle in kilometers"
}
}
},
"Error": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"fields": {
"type": "string"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment