Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PA165 - Airport - project
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ján Macháček
PA165 - Airport - project
Commits
199ecd35
There was an error fetching the commit references. Please try again later.
Unverified
Commit
199ecd35
authored
1 year ago
by
Adam Krídl
Browse files
Options
Downloads
Patches
Plain Diff
Add isSafeToCreateFlight operation into Rest API
parent
9bbe046b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
weather/openapi.yaml
+65
-4
65 additions, 4 deletions
weather/openapi.yaml
with
65 additions
and
4 deletions
weather/openapi.yaml
+
65
−
4
View file @
199ecd35
...
...
@@ -27,19 +27,80 @@ tags:
-
name
:
Weather
description
:
Microservice for weather.
paths
:
/api/isSafeToCreateFlig
t
h
:
/api/isSafeToCreateFligh
t/{departureAirportId}/{arrivalAirportId}
:
get
:
tags
:
-
Weather
summary
:
Get recommendation about flight creation.
description
:
|
Returns an answer whether it is safe to create flight
(from the perspective of weather) based on four parameters.
Returns whether it is safe to create flight
(from the perspective of weather) based on four parameters
describing the flight to be created.
operationId
:
isSafeToCreateFlight
parameters
:
-
name
:
departureAirportId
in
:
path
required
:
true
schema
:
type
:
integer
format
:
int64
-
name
:
arrivalAirportId
in
:
path
required
:
true
schema
:
type
:
integer
format
:
int64
-
name
:
departureTime
in
:
query
required
:
true
schema
:
type
:
string
description
:
time in ISO format
format
:
date-time
example
:
2022-12-21T18:52:10.757Z
-
name
:
arrivalTime
in
:
query
required
:
true
schema
:
type
:
string
description
:
time in ISO format
format
:
date-time
example
:
2022-12-21T18:52:10.757Z
responses
:
"
200"
:
description
:
OK
content
:
application/json
:
schema
:
type
:
boolean
$ref
:
'
#/components/schemas/FlightCreationAdvice'
"
400"
:
description
:
Input data not correct
content
:
application/json
:
schema
:
$ref
:
'
../core/openapi.yaml#/components/schemas/ErrorMessage'
components
:
schemas
:
WeatherReason
:
title
:
Weather reason
description
:
|
Enumeration of weather reasons, e.g. whether it is ok
to fly or the reason why not
type
:
string
example
:
ok-everything
enum
:
-
ok-everything
-
nok-wind
-
nok-temperature
-
nok-rain
FlightCreationAdvice
:
title
:
Flight creation advice
description
:
|
Response of '/api/isSafeToCreateFlight' call.
type
:
object
properties
:
result
:
type
:
boolean
description
:
Result whether it's safe to create such a flight
reason
:
$ref
:
'
#/components/schemas/WeatherReason'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment