|
2067 | 2067 | "200": { |
2068 | 2068 | "description": "Returns vehicle.", |
2069 | 2069 | "schema": { |
2070 | | - "$ref": "#/definitions/VehicleResponse" |
| 2070 | + "$ref": "#/definitions/FleetVehicleResponse" |
2071 | 2071 | } |
2072 | 2072 | }, |
2073 | 2073 | "default": { |
|
2085 | 2085 | ], |
2086 | 2086 | "summary": "/fleet/vehicles/{vehicle_id | external_id}", |
2087 | 2087 | "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 | + ], |
2088 | 2111 | "operationId": "updateVehicle", |
2089 | 2112 | "consumes": [ |
2090 | 2113 | "application/json" |
|
2096 | 2119 | "200": { |
2097 | 2120 | "description": "Returns updated vehicle.", |
2098 | 2121 | "schema": { |
2099 | | - "$ref": "#/definitions/VehicleResponse" |
| 2122 | + "$ref": "#/definitions/FleetVehicleResponse" |
2100 | 2123 | } |
2101 | 2124 | }, |
2102 | 2125 | "default": { |
|
3543 | 3566 | } |
3544 | 3567 | } |
3545 | 3568 | }, |
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 | | - }, |
3604 | 3569 | "Vehicle": { |
3605 | 3570 | "type": "object", |
3606 | 3571 | "description": "A vehicle object.", |
|
5901 | 5866 | } |
5902 | 5867 | } |
5903 | 5868 | }, |
5904 | | - "VehicleResponse": { |
| 5869 | + "FleetVehicleResponse": { |
5905 | 5870 | "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 | + ], |
5907 | 5876 | "properties": { |
5908 | 5877 | "id": { |
5909 | 5878 | "type": "integer", |
5910 | 5879 | "description": "ID of the vehicle.", |
5911 | 5880 | "format": "int64", |
5912 | | - "example": 123 |
| 5881 | + "example": 112 |
5913 | 5882 | }, |
5914 | 5883 | "name": { |
5915 | 5884 | "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" |
5925 | 5887 | }, |
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 | + } |
5937 | 5914 | }, |
5938 | | - "year": { |
5939 | | - "type": "integer", |
5940 | | - "description": "Year the vehicle was made.", |
5941 | | - "format": "int64", |
5942 | | - "example": "2017" |
5943 | | - }, |
5944 | 5915 | "harshAccelSetting": { |
5945 | 5916 | "type": "integer", |
5946 | | - "description": "A number from 1-10 indicating the harsh acceleration setting of the vehicle", |
5947 | 5917 | "format": "int64", |
5948 | | - "example": "2017" |
5949 | | - }, |
5950 | | - "externalIds" : { |
| 5918 | + "description": "Harsh acceleration setting.", |
| 5919 | + "example": 1 |
| 5920 | + }, |
| 5921 | + "externalIds": { |
5951 | 5922 | "type": "object", |
5952 | | - "description": "Dictionary of external IDs (string key-value pairs)", |
5953 | 5923 | "additionalProperties": { |
5954 | | - "type": "string" |
5955 | | - }, |
5956 | | - "example": {"maintenanceId": "ABFS18600"} |
5957 | | - } |
| 5924 | + "type": "string" |
| 5925 | + }, |
| 5926 | + "example": {"maintenanceId": "ABFS18600"} |
| 5927 | + } |
5958 | 5928 | } |
5959 | 5929 | }, |
5960 | 5930 | "MachineHistoryResponse": { |
|
0 commit comments