@shinymayhem/json-schema-generator
Version:
Generate/compile .yaml files (not .yml at the moment) into a single JSON schema file. Resolves references to other schema docuements in the same directory
35 lines (34 loc) • 599 B
YAML
$schema: http://json-schema.org/draft-04/hyper-schema
shortName: car-1.0
title: Car
description: Car
stability: Alpha
strictProperties: true
additionalProperties: false
definitions:
make:
type: string
description: Brand name
model:
type: string
description: Model name
type:
- object
required:
- make
- model
- engine
- wheel
- color
properties:
make:
$ref: car-1.0#/definitions/make
model:
$ref: car-1.0#/definitions/model
engine:
$ref: parts-1.0#/definitions/engine
wheel:
$ref: parts-1.0#/definitions/wheel
color:
$ref: color-1.0