Skip to content

Commit 5098858

Browse files
committed
update swagger
1 parent bb75544 commit 5098858

4 files changed

Lines changed: 57 additions & 12 deletions

File tree

docs/docs.go

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,7 @@ const docTemplate = `{
393393
"200": {
394394
"description": "OK",
395395
"schema": {
396-
"type": "object",
397-
"additionalProperties": {
398-
"type": "string"
399-
}
396+
"$ref": "#/definitions/github_com_DIMO-Network_device-definitions-api_internal_core_queries.GetVINProfileResponse"
400397
}
401398
},
402399
"400": {
@@ -615,6 +612,26 @@ const docTemplate = `{
615612
}
616613
}
617614
},
615+
"github_com_DIMO-Network_device-definitions-api_internal_core_queries.GetVINProfileResponse": {
616+
"type": "object",
617+
"properties": {
618+
"powertrainType": {
619+
"type": "string"
620+
},
621+
"profileRaw": {
622+
"type": "array",
623+
"items": {
624+
"type": "integer"
625+
}
626+
},
627+
"vendor": {
628+
"type": "string"
629+
},
630+
"vin": {
631+
"type": "string"
632+
}
633+
}
634+
},
618635
"internal_api_handlers.DecodeVINRequest": {
619636
"type": "object",
620637
"properties": {

docs/swagger.json

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,7 @@
384384
"200": {
385385
"description": "OK",
386386
"schema": {
387-
"type": "object",
388-
"additionalProperties": {
389-
"type": "string"
390-
}
387+
"$ref": "#/definitions/github_com_DIMO-Network_device-definitions-api_internal_core_queries.GetVINProfileResponse"
391388
}
392389
},
393390
"400": {
@@ -606,6 +603,26 @@
606603
}
607604
}
608605
},
606+
"github_com_DIMO-Network_device-definitions-api_internal_core_queries.GetVINProfileResponse": {
607+
"type": "object",
608+
"properties": {
609+
"powertrainType": {
610+
"type": "string"
611+
},
612+
"profileRaw": {
613+
"type": "array",
614+
"items": {
615+
"type": "integer"
616+
}
617+
},
618+
"vendor": {
619+
"type": "string"
620+
},
621+
"vin": {
622+
"type": "string"
623+
}
624+
}
625+
},
609626
"internal_api_handlers.DecodeVINRequest": {
610627
"type": "object",
611628
"properties": {

docs/swagger.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,19 @@ definitions:
131131
year:
132132
type: integer
133133
type: object
134+
github_com_DIMO-Network_device-definitions-api_internal_core_queries.GetVINProfileResponse:
135+
properties:
136+
powertrainType:
137+
type: string
138+
profileRaw:
139+
items:
140+
type: integer
141+
type: array
142+
vendor:
143+
type: string
144+
vin:
145+
type: string
146+
type: object
134147
internal_api_handlers.DecodeVINRequest:
135148
properties:
136149
countryCode:
@@ -404,9 +417,7 @@ paths:
404417
"200":
405418
description: OK
406419
schema:
407-
additionalProperties:
408-
type: string
409-
type: object
420+
$ref: '#/definitions/github_com_DIMO-Network_device-definitions-api_internal_core_queries.GetVINProfileResponse'
410421
"400":
411422
description: Bad Request
412423
"404":

internal/api/handlers/device_definition_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func GetDeviceDefinitionByID(m mediator.Mediator) fiber.Handler {
102102
// @Tags device-definitions
103103
// @Param vin path string true "17 character usa based VIN eg. WBA12345678901234"
104104
// @Produce json
105-
// @Success 200 {object} map[]string{}
105+
// @Success 200 {object} queries.GetVINProfileResponse
106106
// @Failure 404
107107
// @Failure 400
108108
// @Failure 500

0 commit comments

Comments
 (0)