Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
driveBC API - events JSON schema v1
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {},
"id": "http://example.com/example.json",
"properties": {
"events": {
"items": {
"properties": {
"+ivr_message": {
"type": [
"string",
"null"
]
},
"areas": {
"items": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"created": {
"type": "string"
},
"description": {
"type": "string"
},
"event_subtypes": {
"items": {
"type": "string"
},
"type": "array"
},
"event_type": {
"type": "string"
},
"geography": {
"properties": {
"coordinates": {
"items": {
"anyOf": [
{
"items": {
"type": "number"
},
"type": "array"
},
{
"type": "number"
}
]
},
"type": "array"
},
"type": {
"type": "string"
}
},
"type": "object"
},
"headline": {
"type": "string"
},
"id": {
"type": "string"
},
"jurisdiction_url": {
"type": "string"
},
"roads": {
"items": {
"properties": {
"direction": {
"type": "string"
},
"from": {
"type": "string"
},
"name": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"schedule": {
"properties": {
"intervals": {
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"severity": {
"type": "string"
},
"status": {
"type": "string"
},
"updated": {
"type": "string"
},
"url": {
"type": "string"
}
},
"type": "object"
},
"type": "array"
},
"meta": {
"properties": {
"up_url": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "string"
}
},
"type": "object"
},
"pagination": {
"properties": {
"next_url": {
"type": "string"
},
"offset": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
@Fleid

This comment has been minimized.

Copy link
Owner Author

commented Jun 6, 2017

Created from a sample payload using a generator, tweaked the geography attributes with anyOf to take into account the alternate items type (Points or LineStrings)

@Fleid

This comment has been minimized.

Copy link
Owner Author

commented Aug 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.