Skip to content

Create Flight model & create a post endpoint for creation #2

Description

@lothemar

Fields:

  • String flightNo unique
  • Date departureTime
  • Date arrivalTime
  • String departureLocation
  • String arrivalLocation
  • Number seatsEcon
  • Number seatsBus
  • Number seatsFirst
  • Array terminals

Necessary validators

  • departureTime > arrivalTime
  • seatsEcon, seatsBus, seatsFirst >= 0
  • departureLocation != arrivalLocation

endpoint should be RESTful so the route should look like this: /flights and it should accept POST requests as described in API schema

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions