Skip to content

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

@lothemar

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions