Skip to content
Snippets Groups Projects
openapi.yaml 31 KiB
Newer Older
          type: integer
          description: airplane seat capacity
          format: int32
          example: 150
        type:
          $ref: '#/components/schemas/AirplaneTypeDto'
    NewAirplaneDtoRequest:
      type: object
      title: New Airplane Request
      description: Object for requesting a new Airplane.
      required:
        - name
        - capacity
      properties:
        name:
          type: string
          description: airplane name
          example: Spitfire
        capacity:
          type: integer
          description: airplane seat capacity
          format: int32
          example: 150
      type: object
      title: Pageable Object
      properties:
        offset:
          type: integer
          format: int64
        sort:
          $ref: '#/components/schemas/SortObject'
        pageSize:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        paged:
          type: boolean
        unpaged:
          type: boolean
      type: object
      title: Sort Object
      properties:
        empty:
          type: boolean
        sorted:
          type: boolean
        unsorted:
          type: boolean
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        first:
          type: boolean
        last:
          type: boolean
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: '#/components/schemas/StewardDto'
        number:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        numberOfElements:
          type: integer
          format: int32
        pageable:
          $ref: '#/components/schemas/PageableObject'
        empty:
          type: boolean
    CountryDto:
      allOf:
        - $ref: '#/components/schemas/DomainEntity'
      type: object
      title: Country
      description: Represents a country.
      required:
        - id
        - name
      properties:
        name:
          type: string
          description: country name
    NewCountryDtoRequest:
      type: object
      title: New Country Request
      description: Object for requesting a new Country.
      required:
        - name
      properties:
        name:
          type: string
          description: country name
          example: Canada
    CityDto:
      allOf:
        - $ref: '#/components/schemas/DomainEntity'
      type: object
      title: City
      description: Represents a City in a Country containing Airports.
      required:
        - id
        - name
      properties:
        name:
          type: string
          description: city name
          example: New York, London
        country:
          $ref: '#/components/schemas/CountryDto'
        airports:
          type: array
          items:
            $ref: '#/components/schemas/AirplaneDto'
    GPSLocationDto:
      type: object
      title: GPS Location
      description: Represents a GPS Location of latitude and longitude.
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
          format: double
          example: 41.40338
        longitude:
          type: number
          format: double
          example: 2.17403
    AirportDto:
      allOf:
        - $ref: '#/components/schemas/DomainEntity'
      type: object
      title: Airport
      description: Represents an Airport.
      required:
        - id
        - name
        - code
        - departingFlights
        - arrivingFlights
        - city
        - location
      properties:
        name:
          type: string
          description: airport name
          example: John F. Kennedy International Airport
        code:
          type: string
          description: airport code in IATA format
        departingFlights:
          type: array
          items:
            $ref: '#/components/schemas/FlightDto'
        arrivingFlights:
          type: array
          items:
            $ref: '#/components/schemas/FlightDto'
        city:
          $ref: '#/components/schemas/CityDto'
        location:
          $ref: '#/components/schemas/GPSLocationDto'
  responses:
    SingleStewardDtoResponse:
      description: Response containing a single Steward.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StewardDto'
      links:
        link_to_getSteward:
          operationId: getSteward
          parameters:
            id: $response.body#/id
          description: |
            The `id` value returned in the response can be used as
            the `id` parameter in `GET /stewards/{id}`.