Skip to content

Commit 1e44c6f

Browse files
AChelikanidsharrison
authored andcommitted
api docs: add docs for vehicle patch body
1 parent 5dd17e3 commit 1e44c6f

File tree

1 file changed

+68
-98
lines changed

1 file changed

+68
-98
lines changed

swagger.json

Lines changed: 68 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@
20672067
"200": {
20682068
"description": "Returns vehicle.",
20692069
"schema": {
2070-
"$ref": "#/definitions/VehicleResponse"
2070+
"$ref": "#/definitions/FleetVehicleResponse"
20712071
}
20722072
},
20732073
"default": {
@@ -2085,6 +2085,29 @@
20852085
],
20862086
"summary": "/fleet/vehicles/{vehicle_id | external_id}",
20872087
"description": "Updates a vehicle given either a vehicle ID or external ID key:value pair (ex. payroll:1)",
2088+
"parameters": [
2089+
{
2090+
"in": "body",
2091+
"name": "data",
2092+
"required": true,
2093+
"schema": {
2094+
"type": "object",
2095+
"properties":
2096+
{
2097+
"name": {
2098+
"description": "Name",
2099+
"type": "string"
2100+
},
2101+
"harsh_accel_setting": {
2102+
"description": "Harsh Acceleration Setting\n* 0: Passenger\n* 1: Light Truck\n* 2: Heavy\n* 3: Off\n* 4: Auto",
2103+
"type": "integer",
2104+
"format": "int64",
2105+
"enum": [ 0, 1, 2, 3, 4 ]
2106+
}
2107+
}
2108+
}
2109+
}
2110+
],
20882111
"operationId": "updateVehicle",
20892112
"consumes": [
20902113
"application/json"
@@ -2096,7 +2119,7 @@
20962119
"200": {
20972120
"description": "Returns updated vehicle.",
20982121
"schema": {
2099-
"$ref": "#/definitions/VehicleResponse"
2122+
"$ref": "#/definitions/FleetVehicleResponse"
21002123
}
21012124
},
21022125
"default": {
@@ -3543,64 +3566,6 @@
35433566
}
35443567
}
35453568
},
3546-
"FleetVehicleResponse": {
3547-
"type": "object",
3548-
"description": "A vehicle object as returned for fleet/vehicle",
3549-
"required": [
3550-
"id",
3551-
"name"
3552-
],
3553-
"properties": {
3554-
"id": {
3555-
"type": "integer",
3556-
"description": "ID of the vehicle.",
3557-
"format": "int64",
3558-
"example": 112
3559-
},
3560-
"name": {
3561-
"type": "string",
3562-
"description": "Name of the vehicle.",
3563-
"example": "Truck A7"
3564-
},
3565-
"vehicleInfo": {
3566-
"type": "object",
3567-
"description": "",
3568-
"properties": {
3569-
"vin": {
3570-
"type": "string",
3571-
"description": "Vehicle Identification Number.",
3572-
"example": "1FUJA6BD31LJ09646"
3573-
},
3574-
"make": {
3575-
"type": "string",
3576-
"description": "Make of the vehicle.",
3577-
"example": "Honda"
3578-
},
3579-
"model": {
3580-
"type": "string",
3581-
"description": "Model of the Vehicle.",
3582-
"example": "Odyssey"
3583-
},
3584-
"year": {
3585-
"type": "integer",
3586-
"format": "int64",
3587-
"description": "Year of the vehicle.",
3588-
"example": 1997
3589-
}
3590-
}
3591-
},
3592-
"harshAccelSetting": {
3593-
"type": "integer",
3594-
"format": "int64",
3595-
"description": "Harsh acceleration setting.",
3596-
"example": 1
3597-
},
3598-
"externalIds": {
3599-
"type": "object",
3600-
"additionalProperties": true
3601-
}
3602-
}
3603-
},
36043569
"Vehicle": {
36053570
"type": "object",
36063571
"description": "A vehicle object.",
@@ -5901,60 +5866,65 @@
59015866
}
59025867
}
59035868
},
5904-
"VehicleResponse": {
5869+
"FleetVehicleResponse": {
59055870
"type": "object",
5906-
"description": "Contains information about the vehicle",
5871+
"description": "A vehicle object as returned for fleet/vehicle",
5872+
"required": [
5873+
"id",
5874+
"name"
5875+
],
59075876
"properties": {
59085877
"id": {
59095878
"type": "integer",
59105879
"description": "ID of the vehicle.",
59115880
"format": "int64",
5912-
"example": 123
5881+
"example": 112
59135882
},
59145883
"name": {
59155884
"type": "string",
5916-
"description": "Name of the vehicle",
5917-
"format": "string",
5918-
"example": "Bob's Truck"
5919-
},
5920-
"make": {
5921-
"type": "string",
5922-
"description": "Make of the vehicle",
5923-
"format": "string",
5924-
"example": "Toyota"
5885+
"description": "Name of the vehicle.",
5886+
"example": "Truck A7"
59255887
},
5926-
"model": {
5927-
"type": "string",
5928-
"description": "Model of the vehicle",
5929-
"format": "string",
5930-
"example": "Corolla"
5931-
},
5932-
"vin": {
5933-
"type": "string",
5934-
"description": "VIN of the vehicle",
5935-
"format": "string",
5936-
"example": "1HGBH41JXMN109186"
5888+
"vehicleInfo": {
5889+
"type": "object",
5890+
"description": "",
5891+
"properties": {
5892+
"vin": {
5893+
"type": "string",
5894+
"description": "Vehicle Identification Number.",
5895+
"example": "1FUJA6BD31LJ09646"
5896+
},
5897+
"make": {
5898+
"type": "string",
5899+
"description": "Make of the vehicle.",
5900+
"example": "Honda"
5901+
},
5902+
"model": {
5903+
"type": "string",
5904+
"description": "Model of the Vehicle.",
5905+
"example": "Odyssey"
5906+
},
5907+
"year": {
5908+
"type": "integer",
5909+
"format": "int64",
5910+
"description": "Year of the vehicle.",
5911+
"example": 1997
5912+
}
5913+
}
59375914
},
5938-
"year": {
5939-
"type": "integer",
5940-
"description": "Year the vehicle was made.",
5941-
"format": "int64",
5942-
"example": "2017"
5943-
},
59445915
"harshAccelSetting": {
59455916
"type": "integer",
5946-
"description": "A number from 1-10 indicating the harsh acceleration setting of the vehicle",
59475917
"format": "int64",
5948-
"example": "2017"
5949-
},
5950-
"externalIds" : {
5918+
"description": "Harsh acceleration setting.",
5919+
"example": 1
5920+
},
5921+
"externalIds": {
59515922
"type": "object",
5952-
"description": "Dictionary of external IDs (string key-value pairs)",
59535923
"additionalProperties": {
5954-
"type": "string"
5955-
},
5956-
"example": {"maintenanceId": "ABFS18600"}
5957-
}
5924+
"type": "string"
5925+
},
5926+
"example": {"maintenanceId": "ABFS18600"}
5927+
}
59585928
}
59595929
},
59605930
"MachineHistoryResponse": {

0 commit comments

Comments
 (0)