Skip to content

Instantly share code, notes, and snippets.

@gpittau
Last active August 29, 2015 14:14
Show Gist options
  • Save gpittau/621eb27d40c0474a9925 to your computer and use it in GitHub Desktop.
Save gpittau/621eb27d40c0474a9925 to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "data",
"type": "object",
"properties": {
"flights": {
"id": "flights",
"type": "array",
"items": {
"id": "flight",
"type": "object",
"properties": {
"airlineCode": {
"id": "airlineCode",
"type": "string"
},
"flightNumber": {
"id": "flightNumber",
"type": "string"
},
"flightDate": {
"id": "flightDate",
"type": "string",
"format": "full-date"
},
"legs": {
"id": "legs",
"type": "array",
"items": {
"id": "leg",
"$ref": "http://rawgit.com/gpittau/621eb27d40c0474a9925/raw/leg-schema.json"
}
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "/",
"type": "object",
"properties": {
"status": {
"$ref": "http://rawgit.com/gpittau/621eb27d40c0474a9925/raw/status-schema.json"
},
"data": {
"$ref": "http://rawgit.com/gpittau/621eb27d40c0474a9925/raw/data-schema.json"
}
},
"additionalProperties": false,
"required": [
"status",
"data"
]
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "leg",
"type": "object",
"definitions": {
"LANDateTime": {
"type": "object",
"format": "grid",
"properties": {
"utc": {
"id": "utc",
"type": "string",
"format": "datetime"
},
"local": {
"id": "local",
"type": "string",
"format": "datetime"
}
},
"additionalProperties": false
},
"LANEvent": {
"type": "object",
"properties": {
"scheduleDateTime": {
"id": "scheduleDateTime",
"$ref": "#/definitions/LANDateTime"
},
"realDateTime": {
"id": "realDateTime",
"$ref": "#/definitions/LANDateTime"
},
"estimatedDateTime": {
"id": "estimatedDateTime",
"$ref": "#/definitions/LANDateTime"
}
},
"additionalProperties": false
}
},
"properties": {
"airlineCodes": {
"id": "airlineCodes",
"type": "object",
"format": "grid",
"properties": {
"operating": {
"id": "operating",
"type": "string"
},
"marketing": {
"id": "marketing",
"type": "string"
},
"owner": {
"id": "owner",
"type": "string"
}
},
"additionalProperties": false
},
"departure": {
"id": "departure",
"type": "object",
"format": "grid",
"properties": {
"airportCode": {
"id": "airportCode",
"type": "string"
},
"airportName": {
"id": "airportName",
"type": "string"
},
"terminal": {
"id": "terminal",
"type": "string"
},
"cityName": {
"id": "cityName",
"type": "string"
},
"blockOff": {
"id": "blockOff",
"$ref": "#/definitions/LANEvent"
},
"takeOff": {
"id": "takeOff",
"$ref": "#/definitions/LANEvent"
}
},
"additionalProperties": false
},
"arrival": {
"id": "arrival",
"type": "object",
"properties": {
"airportCode": {
"id": "airportCode",
"type": "string"
},
"airportName": {
"id": "airportName",
"type": "string"
},
"terminal": {
"id": "terminal",
"type": "string"
},
"cityName": {
"id": "cityName",
"type": "string"
},
"touchDown": {
"id": "touchDown",
"$ref": "#/definitions/LANEvent"
},
"blockOn": {
"id": "blockOn",
"$ref": "#/definitions/LANEvent"
}
},
"additionalProperties": false
},
"flightServiceType": {
"id": "flightServiceType",
"type": "object",
"properties": {
"code": {
"id": "code",
"type": "string"
},
"description": {
"id": "description",
"type": "string"
},
"routeTypeCode": {
"id": "routeTypeCode",
"type": "string"
}
},
"additionalProperties": false
},
"material": {
"id": "material",
"type": "object",
"properties": {
"aircraftRegistration": {
"id": "aircraftRegistration",
"type": "string"
},
"fleet": {
"id": "fleet",
"type": "string"
},
"model": {
"id": "model",
"type": "string"
}
},
"additionalProperties": false
},
"statusCode": {
"id": "statusCode",
"type": "string"
},
"descriptionStatusCode": {
"id": "descriptionStatusCode",
"type": "string"
},
"operationStatusCode": {
"id": "operationStatusCode",
"type": "string"
},
"descriptionOperationStatusCode": {
"id": "descriptionOperationStatusCode",
"type": "string"
},
"sufixCode": {
"id": "sufixCode",
"type": "string"
},
"descriptionSufixCode": {
"id": "descriptionSufixCode",
"type": "string"
},
"massiveContingency": {
"id": "massiveContingency",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"massiveContingencyId": {
"id": "massiveContingencyId",
"type": "string"
},
"cause": {
"id": "cause",
"type": "string"
},
"isCommercialProcedureApplicable": {
"id": "isCommercialProcedureApplicable",
"type": "string"
},
"isPublic": {
"id": "isPublic",
"type": "string"
},
"status": {
"id": "status",
"type": "string"
},
"notice": {
"id": "notice",
"type": "array",
"items": {
"id": "0",
"type": "object",
"properties": {
"languageIsoCode": {
"id": "languageIsoCode",
"type": "string"
},
"countryIsoCode": {
"id": "countryIsoCode",
"type": "string"
},
"url": {
"id": "url",
"type": "string"
},
"title": {
"id": "title",
"type": "string"
},
"description": {
"id": "description",
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"operationalContingency": {
"id": "operationalContingency",
"type": "array",
"items": {
"id": "operationalContingencyItem",
"type": "object",
"properties": {
"departureAirportIataCode": {
"id": "departureAirportIataCode",
"type": "string"
},
"contingencyType": {
"id": "contingencyType",
"type": "string"
},
"contingencyDescription": {
"id": "contingencyDescription",
"type": "string"
},
"statusLog": {
"id": "statusLog",
"type": "array",
"items": {
"id": "statusLogItem",
"type": "object",
"properties": {
"statusDateTime": {
"id": "statusDateTime",
"type": "string"
},
"contingencyStatusCode": {
"id": "contingencyStatusCode",
"type": "string"
},
"descriptionContingencyStatusCode": {
"id": "descriptionContingencyStatusCode",
"type": "string"
},
"informedDateTime": {
"id": "informedDateTime",
"type": "string"
},
"cause": {
"id": "cause",
"type": "object",
"properties": {
"causeCode": {
"id": "causeCode",
"type": "string"
},
"descriptionCauseCode": {
"id": "descriptionCauseCode",
"type": "string"
},
"causeOtherText": {
"id": "causeOtherText",
"type": "string"
},
"inputDateTime": {
"id": "inputDateTime",
"type": "string"
}
},
"additionalProperties": false
},
"reason": {
"id": "reason",
"type": "object",
"properties": {
"reasonCode": {
"id": "reasonCode",
"type": "string"
},
"reasonDescription": {
"id": "reasonDescription",
"type": "string"
},
"reasonOtherText": {
"id": "reasonOtherText",
"type": "string"
},
"inputDateTime": {
"id": "inputDateTime",
"type": "string"
}
},
"additionalProperties": true
},
"basicServices": {
"id": "basicServices",
"type": "array",
"items": {
"id": "basicServiceItem",
"type": "object",
"properties": {
"basicServiceType": {
"id": "basicServiceType",
"type": "string"
},
"basicServiceDescription": {
"id": "basicServiceDescription",
"type": "string"
},
"isServiceApplies": {
"id": "isServiceApplies",
"type": "string"
},
"isServiceExceptions": {
"id": "isServiceExceptions",
"type": "string"
},
"isServiceGranted": {
"id": "isServiceGranted",
"type": "string"
},
"originQuantity": {
"id": "originQuantity",
"type": "string"
},
"destinationQuantity": {
"id": "destinationQuantity",
"type": "string"
}
},
"additionalProperties": false
}
},
"notifications": {
"id": "notifications",
"type": "object",
"properties": {
"isNotifiedInAirport": {
"id": "isNotifiedInAirport",
"type": "string"
},
"airportNotificationText": {
"id": "airportNotificationText",
"type": "string"
},
"isNotifiedOutsideAirport": {
"id": "isNotifiedOutsideAirport",
"type": "string"
},
"outsideAirportNotificationText": {
"id": "outsideAirportNotificationText",
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"protections": {
"id": "protections",
"type": "array",
"items": {
"id": "projection",
"type": "object",
"properties": {
"airlineCode": {
"id": "airlineCode",
"type": "string"
},
"flightNumber": {
"id": "flightNumber",
"type": "string"
},
"flightDate": {
"id": "flightDate",
"type": "string"
},
"departureAirportCode": {
"id": "departureAirportCode",
"type": "string"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"gateInformation": {
"id": "gateInformation",
"type": "object",
"properties": {
"gateNumber": {
"id": "gateNumber",
"type": "string"
},
"gateDescription": {
"id": "gateDescription",
"type": "string"
}
},
"additionalProperties": false
}
}
}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "status"
,
"type": "object",
"properties": {
"code": {
"id": "code",
"type": "integer",
"default": "200"
},
"message": {
"id": "message",
"type": "string"
},
"nativeMessage": {
"id": "nativeMessage",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"code",
"message",
"nativeMessage"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment