Skip to content

Commit

Permalink
add spec for vehicle static data
Browse files Browse the repository at this point in the history
  • Loading branch information
slashmili committed Mar 13, 2024
1 parent f46dacd commit 5c64027
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Build Docs
run: |
mkdir -p docs/v1
npx --yes @redocly/cli join introduction.yml hm-oauth-rest-v1.yml hm-vehicle-data-api-v1.yml hm-fleet-clearance-v1.yml hm-eligibility-v1.yml -o hm-apis.yaml
npx --yes @redocly/cli join introduction.yml hm-oauth-rest-v1.yml hm-vehicle-data-api-v1.yml hm-vehicle-static-data-api-v1.yml hm-fleet-clearance-v1.yml hm-eligibility-v1.yml -o hm-apis.yaml
npx @redocly/cli build-docs --disableGoogleFont --output=docs/v1/index.html hm-apis.yaml
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ jobs:
- uses: actions/checkout@v3
- name: Build Docs
run: |
npx --yes @redocly/cli join introduction.yml hm-oauth-rest-v1.yml hm-vehicle-data-api-v1.yml hm-fleet-clearance-v1.yml hm-eligibility-v1.yml -o hm-apis.yaml
npx --yes @redocly/cli join introduction.yml hm-oauth-rest-v1.yml hm-vehicle-data-api-v1.yml hm-vehicle-static-data-api-v1.yml hm-fleet-clearance-v1.yml hm-eligibility-v1.yml -o hm-apis.yaml
npx @redocly/cli build-docs hm-apis.yaml
83 changes: 72 additions & 11 deletions hm-vehicle-static-data-api-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ info:
Sandbox server: `https://sandbox.api.high-mobility.com`
Production server: `https://api.high-mobility.com`
Servers:
* Production server: `https://api.high-mobility.com`
title: Vehicle Static Data API(Draft)
version: 1.0.0
openapi: 3.0.3


paths:
/v1/vehicle-static-data/{vin}:
get:
Expand All @@ -30,13 +30,36 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/response'
$ref: '#/components/schemas/VehicleStaticDataResponse'
examples:
successful:
value:
manufacturer:
brand: "Jeep"
sub_model: "80th Anniversary Plug-In Hybrid 4WD"
type_group_name: "Compass"
model: "Compass (M7)(2020->)"
sales_description: "Compass 1.3 Plug-In Hybrid (EURO 6d) 80th Annivers"
equipment:
series_equipment:
- description: "airbag driver side/passenger side"
positions: []
manufacturer_id: null
- descripion: "navigation package"
positions:
- description: "driver assistance system: traffic sign detection (TSR)"
manufacturer_id: "JPE"
special_equipment:
- description: "Winter package"
positions:
- description: "windshield wiper heated"
manufacturer_id: AAC
description: successful operation
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/response401'
$ref: '#/components/schemas/VehicleStaticDataResponse401'
examples:
Invalid authorization header:
value:
Expand All @@ -61,18 +84,56 @@ paths:
- VehicleStaticDataAuth:
- vehicle:static-data
tags:
- Data API
- Static Data API
servers:
- url: https://sandbox.api.high-mobility.com
- url: https://api.high-mobility.com

components:
schemas:
response:
VehicleStaticDataManufacturer:
properties:
brand:
type: string
sub_model:
type: string
type_group_name:
type: string
model:
type: string
sales_description:
type: string
VehicleStaticDataEquipment:
properties:
series_equipment:
type: array
items:
$ref: '#/components/schemas/VehicleStaticDataEquipmentList'
special_equipment:
type: array
items:
$ref: '#/components/schemas/VehicleStaticDataEquipmentList'

VehicleStaticDataEquipmentList:
properties:
data:
type: object
response401:
manufacturer_id:
type: string
description:
type: string
positions:
type: array
items:
type: string


VehicleStaticDataResponse:
properties:
manufacturer:
$ref: '#/components/schemas/VehicleStaticDataManufacturer'
equipment:
$ref: '#/components/schemas/VehicleStaticDataEquipment'

VehicleStaticDataResponse401:
properties:
errors:
items:
Expand Down

0 comments on commit 5c64027

Please sign in to comment.