Defined using OpenAPI format. Can be found in api/FlightTrackerApi.yml Generated code using oapi-codegen tool (configuration is in api/oapi-codegen-config.yml)
API exposed: http://localhost:8080/calculate
API spec defined using: OpenAPI
Boilerplate code generation using: oapi-codegen
Server framerwork: Echo
gen, build, test, run
% make run
curl -X 'POST' \
'http://localhost:8080/calculate' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '[ [ "SFO", "EWR" ] ]'
curl -X 'POST' \
'http://localhost:8080/calculate' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '[["ATL", "EWR"], ["SFO", "ATL"]]'
curl -X 'POST' \
'http://localhost:8080/calculate' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '[["IND", "EWR"], ["SFO", "ATL"], ["GSO", "IND"], ["ATL", "GSO"]]'