Skip to content

Commit d20955d

Browse files
committed
normalizing common structures for propulsion and vehicle type
1 parent 215c5aa commit d20955d

1 file changed

Lines changed: 27 additions & 11 deletions

File tree

schema/templates/common.json

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,26 @@
7373
},
7474
"additionalProperties": false
7575
},
76+
"propulsion_type": {
77+
"$id": "#/definitions/propulsion_type",
78+
"type": "string",
79+
"description": "The type of propulsion",
80+
"enum": [
81+
"combustion",
82+
"electric",
83+
"electric_assist",
84+
"human"
85+
]
86+
},
7687
"propulsion_types": {
7788
"$id": "#/definitions/propulsion_types",
7889
"type": "array",
79-
"description": "The type of propulsion; allows multiple values",
90+
"description": "Array of propulsion types, allowing multiple values",
8091
"items": {
81-
"type": "string",
82-
"enum": [
83-
"combustion",
84-
"electric",
85-
"electric_assist",
86-
"human"
87-
]
92+
"$id": "#/definitions/propulsion_types/items",
93+
"$ref": "#/definitions/propulsion_type"
8894
},
89-
"uniqueItems": true,
90-
"minItems": 1
95+
"uniqueItems": true
9196
},
9297
"rental_methods": {
9398
"$id": "#/definitions/rental_methods",
@@ -420,7 +425,8 @@
420425
"propulsion_types": {
421426
"$id": "#/definitions/vehicle/properties/propulsion_types",
422427
"$ref": "#/definitions/propulsion_types",
423-
"description": "The type of propulsion; allows multiple values"
428+
"description": "The type of propulsion; allows multiple values",
429+
"minItems": 1
424430
}
425431
},
426432
"additionalProperties": false
@@ -632,6 +638,16 @@
632638
"other"
633639
]
634640
},
641+
"vehicle_types": {
642+
"$id": "#/definitions/vehicle_types",
643+
"type": "array",
644+
"description": "Array of vehicle types",
645+
"items": {
646+
"$id": "#/definitions/vehicle_types/items",
647+
"$ref": "#/definitions/vehicle_type"
648+
},
649+
"uniqueItems": true
650+
},
635651
"version": {
636652
"$id": "#/definitions/version",
637653
"type": "string",

0 commit comments

Comments
 (0)