Created
June 6, 2017 23:49
-
-
Save Fleid/0927e3a2ffa46e2100d1b17674599092 to your computer and use it in GitHub Desktop.
driveBC API - events JSON schema v1
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
{ | |
"$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" | |
} |
Used in the following blog post series (see part 3) : https://blogs.technet.microsoft.com/cansql/2017/05/29/building-a-dashboard-on-top-of-a-web-api-with-power-bi-and-azure-part-1/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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)