openapi: "3.0.2" info: version: "1.0" title: Airline API description: "API that provides the airlines to update Flight Information needed for Display boards and Mobile devices" contact: name: API team url: https://www.google.com/ servers: - url: https://api.airline.com/v1/ description: Production server - url: https://dev.api.airline.com/v1/ description: Development server paths: /flight: get: tags: - Flight summary: "Gets flight information for all flights" description: "Returns a list of flights" operationId: getFlights parameters: - name: Authorization in: header description: "The JWT access token associated to the user or display board" required: true schema: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" responses: 200: description: Flights Repsonse content: application/json: schema: $ref: "#/components/schemas/FlightsResponse" put: tags: - Flight summary: " Updates an existing flight " description: " Updates an existing flight" operationId: updateFlight parameters: - name: flightId in: path description: "The id associated to the flight" required: true schema: type: string example: "2532eba0-7b39-4440-9ca1-b319ec27331c" - name: Authorization in: header description: "The JWT access token associated to the user or display board" required: true schema: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" responses: 200: description: Flight Response requestBody: description: Update an existent flight in the store required: true content: application/json: schema: $ref: '#/components/schemas/FlightResponse' /flight/{flightId}: get: tags: - Flight summary: "Get inforamtion for a specific flight" description: "Get inforamtion for a specific flight" operationId: getFlight parameters: - name: flightId in: path description: "The id associated to the flight" required: true schema: type: string example: "2532eba0-7b39-4440-9ca1-b319ec27331c" - name: Authorization in: header description: "The JWT access token associated to the user or display board" required: true schema: type: string example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" responses: 200: description: Flights Response content: application/json: schema: $ref: "#/components/schemas/FlightResponse" components: schemas: FlightsResponse: title: flights type: array items: type: object properties: id: type: string airline: type: string flightNumber: type: string destination: type: string scheduledDepartureTime: type: string estimateDepartureTime: type: string actualDepartureTime: type: string status: type: string depatureGate: type: string example: - id: 9a4a5eb6-2428-40b0-8ef6-f05d132d0f95 airline: "Air New Zealand" flightNumber: "NZ0128" destination: Melbourne scheduledDepartureTime: "2020-01-13T17:30:00.000Z" estimateDepartureTime: "2020-01-13T17:30:00.000Z" actualDepartureTime: "2020-01-13T17:30:00.000Z" status: On Time depatureGate: G6 FlightResponse: title: flight type: object properties: id: type: string airline: type: string flightNumber: type: string destination: type: string scheduledDepartureTime: type: string estimateDepartureTime: type: string actualDepartureTime: type: string status: type: string depatureGate: type: string example: - id: 9a4a5eb6-2428-40b0-8ef6-f05d132d0f95 airline: "Air New Zealand" flightNumber: "NZ0128" destination: Melbourne scheduledDepartureTime: "2020-01-13T17:30:00.000Z" estimateDepartureTime: "2020-01-13T17:30:00.000Z" actualDepartureTime: "2020-01-13T17:30:00.000Z" status: On Time depatureGate: G6