Last active
June 28, 2019 03:35
-
-
Save pwmcintyre/b7107429bf65cb7621b4ab4275a2d682 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$id": "https://example.com/arrays.schema.json", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"description": "A representation of a person, company, organization, or place", | |
"type": "object", | |
"properties": { | |
"fruits": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"vegetables": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/veggie" } | |
} | |
}, | |
"definitions": { | |
"veggie": { | |
"type": "object", | |
"required": [ "veggieName", "veggieLike" ], | |
"properties": { | |
"veggieName": { | |
"type": "string", | |
"description": "The name of the vegetable." | |
}, | |
"veggieLike": { | |
"type": "boolean", | |
"description": "Do I like this vegetable?" | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: Error | |
$id: nbos/common/error/v0.0.1.json | |
$schema: "http://json-schema.org/draft-07/schema#" | |
description: Error message for human and machine consumption | |
type: object | |
required: | |
- code | |
- message | |
properties: | |
code: | |
type: string | |
message: | |
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$id": "https://example.com/person.schema.json", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"title": "Person", | |
"type": "object", | |
"properties": { | |
"firstName": { | |
"type": "string", | |
"description": "The person's first name." | |
}, | |
"lastName": { | |
"type": "string", | |
"description": "The person's last name." | |
}, | |
"age": { | |
"description": "Age in years which must be equal to or greater than zero.", | |
"type": "integer", | |
"minimum": 0 | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: Parameter | |
$id: nbos/cls/parameter/v0.0.1.json | |
$schema: "http://json-schema.org/draft-07/schema#" | |
description: Just a thing that holds a value | |
type: object | |
properties: | |
key: | |
type: string | |
value: | |
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: Pet | |
$id: nbos/cls/pet/v0.0.1.json | |
$schema: "http://json-schema.org/draft-07/schema#" | |
description: The definitive model of a companion | |
type: object | |
required: | |
- id | |
- name | |
properties: | |
id: | |
type: integer | |
name: | |
type: string | |
tag: | |
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Vehicle Transaction", | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"description": "Vehicle Transaction from the Roadside.", | |
"type": "object", | |
"required": [ | |
"roadside_id", | |
"roadside_timestamp", | |
"roadside_zone_id", | |
"roadside_lane_id" | |
], | |
"properties": { | |
"roadside_id": { | |
"type": "string", | |
"description": "The Roadside ID." | |
}, | |
"roadside_timestamp": { | |
"type": "string", | |
"description": "The Roadside Timestamp in ISO format (YYYY-MM-DDThh:mm:ss.SSSZ)." | |
}, | |
"roadside_zone_id": { | |
"type": "string", | |
"description": "The Roadside Zone ID." | |
}, | |
"roadside_lane_id": { | |
"type": "string", | |
"description": "The Roadside Lane ID." | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment