-
Notifications
You must be signed in to change notification settings - Fork 0
Car Service
Cody Ley-Han edited this page Apr 5, 2018
·
1 revision
{
"id": {
"description": "Unique identifier",
"type": "string"
},
"make": {
"description": "car make eg Honda, Ford, etc",
"type": "string"
},
"model": {
"description": "car model eg Civic, F150, etc",
"type": "string"
},
"year": {
"description": "model year of the car",
"type": "integer",
"exclusiveMinimum": 0
},
"color": {
"description": "car color",
"type": "string"
},
"user_id": {
"description": "user who owns the vehicle",
"type": "string"
},
"created_at": {
"type": "string",
"format": "date-time in RFC3339 format"
},
"updated_at": {
"type": "string",
"format": "date-time in RFC3339 format"
}
}
Authorization: Admin
Response
{
"cars": ["Car"]
}
Response
{
"car": "Car"
}
Request
{
"$schema": "http://json-schema.org/draft-07/schema",
"properties": {
"make": {
"description": "car make eg Honda, Ford, etc",
"type": "string"
},
"model": {
"description": "car model eg Civic, F150, etc",
"type": "string"
},
"year": {
"description": "model year of the car",
"type": "integer",
"exclusiveMinimum": 0
},
"color": {
"description": "car color",
"type": "string"
}
},
"required": [
"make",
"year",
"color"
]
}
Response
Status Code: 201
{
"car": "Car"
}
Status Code: 204