Skip to content

Commit 12bfadc

Browse files
committed
api docs: add docs for vehicle patch body
1 parent e799921 commit 12bfadc

File tree

1 file changed

+68
-40
lines changed

1 file changed

+68
-40
lines changed

swagger.json

+68-40
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,7 @@
20702070
"200": {
20712071
"description": "Returns vehicle.",
20722072
"schema": {
2073-
"$ref": "#/definitions/VehicleResponse"
2073+
"$ref": "#/definitions/FleetVehicleResponse"
20742074
}
20752075
},
20762076
"default": {
@@ -2088,6 +2088,29 @@
20882088
],
20892089
"summary": "/fleet/vehicles/{vehicle_id | external_id}",
20902090
"description": "Updates a vehicle given either a vehicle ID or external ID key:value pair (ex. payroll:1)",
2091+
"parameters": [
2092+
{
2093+
"in": "body",
2094+
"name": "data",
2095+
"required": true,
2096+
"schema": {
2097+
"type": "object",
2098+
"properties":
2099+
{
2100+
"name": {
2101+
"description": "Name",
2102+
"type": "string"
2103+
},
2104+
"harsh_accel_setting": {
2105+
"description": "Harsh Acceleration Setting\n* 0: Passenger\n* 1: Light Truck\n* 2: Heavy\n* 3: Off\n* 4: Auto",
2106+
"type": "integer",
2107+
"format": "int64",
2108+
"enum": [ 0, 1, 2, 3, 4 ]
2109+
}
2110+
}
2111+
}
2112+
}
2113+
],
20912114
"operationId": "updateVehicle",
20922115
"consumes": [
20932116
"application/json"
@@ -2099,7 +2122,7 @@
20992122
"200": {
21002123
"description": "Returns updated vehicle.",
21012124
"schema": {
2102-
"$ref": "#/definitions/VehicleResponse"
2125+
"$ref": "#/definitions/FleetVehicleResponse"
21032126
}
21042127
},
21052128
"default": {
@@ -5622,60 +5645,65 @@
56225645
}
56235646
}
56245647
},
5625-
"VehicleResponse": {
5648+
"FleetVehicleResponse": {
56265649
"type": "object",
5627-
"description": "Contains information about the vehicle",
5650+
"description": "A vehicle object as returned for fleet/vehicle",
5651+
"required": [
5652+
"id",
5653+
"name"
5654+
],
56285655
"properties": {
56295656
"id": {
56305657
"type": "integer",
56315658
"description": "ID of the vehicle.",
56325659
"format": "int64",
5633-
"example": 123
5660+
"example": 112
56345661
},
56355662
"name": {
56365663
"type": "string",
5637-
"description": "Name of the vehicle",
5638-
"format": "string",
5639-
"example": "Bob's Truck"
5640-
},
5641-
"make": {
5642-
"type": "string",
5643-
"description": "Make of the vehicle",
5644-
"format": "string",
5645-
"example": "Toyota"
5664+
"description": "Name of the vehicle.",
5665+
"example": "Truck A7"
56465666
},
5647-
"model": {
5648-
"type": "string",
5649-
"description": "Model of the vehicle",
5650-
"format": "string",
5651-
"example": "Corolla"
5652-
},
5653-
"vin": {
5654-
"type": "string",
5655-
"description": "VIN of the vehicle",
5656-
"format": "string",
5657-
"example": "1HGBH41JXMN109186"
5667+
"vehicleInfo": {
5668+
"type": "object",
5669+
"description": "",
5670+
"properties": {
5671+
"vin": {
5672+
"type": "string",
5673+
"description": "Vehicle Identification Number.",
5674+
"example": "1FUJA6BD31LJ09646"
5675+
},
5676+
"make": {
5677+
"type": "string",
5678+
"description": "Make of the vehicle.",
5679+
"example": "Honda"
5680+
},
5681+
"model": {
5682+
"type": "string",
5683+
"description": "Model of the Vehicle.",
5684+
"example": "Odyssey"
5685+
},
5686+
"year": {
5687+
"type": "integer",
5688+
"format": "int64",
5689+
"description": "Year of the vehicle.",
5690+
"example": 1997
5691+
}
5692+
}
56585693
},
5659-
"year": {
5660-
"type": "integer",
5661-
"description": "Year the vehicle was made.",
5662-
"format": "int64",
5663-
"example": "2017"
5664-
},
56655694
"harshAccelSetting": {
56665695
"type": "integer",
5667-
"description": "A number from 1-10 indicating the harsh acceleration setting of the vehicle",
56685696
"format": "int64",
5669-
"example": "2017"
5670-
},
5671-
"externalIds" : {
5697+
"description": "Harsh acceleration setting.",
5698+
"example": 1
5699+
},
5700+
"externalIds": {
56725701
"type": "object",
5673-
"description": "Dictionary of external IDs (string key-value pairs)",
56745702
"additionalProperties": {
5675-
"type": "string"
5676-
},
5677-
"example": {"maintenanceId": "ABFS18600"}
5678-
}
5703+
"type": "string"
5704+
},
5705+
"example": {"maintenanceId": "ABFS18600"}
5706+
}
56795707
}
56805708
},
56815709
"MachineHistoryResponse": {

0 commit comments

Comments
 (0)