#%RAML 1.0
version: v1
title: American Flights API
types:
AmericanFlight: !include exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/AmericanFlightDataType.raml
/flights:
description: a flight record from the American database
get:
description: get all flight records
queryParameters:
destination:
required: false
enum:
- SFO
- LAX
- CLE
responses:
200:
body:
application/json:
type: AmericanFlight[]
example: !include exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example/1.0.1/AmericanFlightsExample.raml
post:
description: add a flight record
body:
application/json:
example: !include examples/AmericanFlightsNoIDExample.raml
responses:
201:
body:
application/json:
example:
responsemesssage: Flight record added (honest joe, it's in there)
/{ID}:
description: one flight record matching ID
get:
description: return one flight with record number equal ID
responses:
200:
body:
application/json:
type: AmericanFlight
example: !include examples/AmericanFlightExample.raml
delete:
responses:
200:
body:
application/json:
example:
message: Flight deleted (but not really)
put:
body:
application/json:
type: AmericanFlight
example: !include examples/AmericanFlightsNoIDExample.raml
responses:
200:
body:
application/json:
example:
message: Flight updated (but not really)
Comments