129 lines
No EOL
3.4 KiB
YAML
129 lines
No EOL
3.4 KiB
YAML
openapi: 3.0.4
|
|
info:
|
|
title: GSN Predictor - OpenAPI 3.0
|
|
version: 0.0.1
|
|
paths:
|
|
/api/v1/prediction:
|
|
post:
|
|
tags:
|
|
- Prediction
|
|
summary: Perform preidction
|
|
operationId: performPrediction
|
|
parameters:
|
|
- in: query
|
|
name: parameters
|
|
required: false
|
|
schema:
|
|
$ref: '#/components/schemas/Prediction/Parameters'
|
|
style: form
|
|
explode: true
|
|
requestBody:
|
|
required: false
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Prediction/Parameters'
|
|
responses:
|
|
"200":
|
|
description: "Prediction response"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/Prediction/Result'
|
|
default:
|
|
description: Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
|
|
components:
|
|
schemas:
|
|
Error:
|
|
type: object
|
|
required:
|
|
- message
|
|
properties:
|
|
message:
|
|
type: string
|
|
details:
|
|
type: string
|
|
Prediction:
|
|
Parameters:
|
|
type: object
|
|
properties:
|
|
launch_latitude: # TODO: altitude not required with fallback to https://github.com/priyeshpatel/ruaumoko Go analog
|
|
type: number
|
|
launch_longitude:
|
|
type: number
|
|
launch_datetime:
|
|
type: string
|
|
format: date-time
|
|
launch_altitude:
|
|
type: number
|
|
profile:
|
|
type: string
|
|
enum: ["standard_profile", "float_profile", "reverse_profile", "custom_profile"]
|
|
ascent_rate:
|
|
type: number
|
|
burst_altitude:
|
|
type: number
|
|
descent_rate:
|
|
type: number
|
|
float_altitude:
|
|
type: number
|
|
stop_datetime:
|
|
type: string
|
|
format: date-time
|
|
ascent_curve:
|
|
type: string
|
|
description: "Base64 encoded ascent curve"
|
|
descent_curve:
|
|
type: string
|
|
description: "Base64 encoded descent curve"
|
|
interpolate:
|
|
type: boolean
|
|
default: false
|
|
format: # TODO: custom output format (csv, kml) with json as default
|
|
type: string
|
|
enum: ["json"]
|
|
default: json
|
|
dataset:
|
|
type: string
|
|
format: date-time
|
|
Result: #
|
|
type: object
|
|
required:
|
|
- metadata
|
|
- prediction
|
|
properties:
|
|
metadata:
|
|
type: object
|
|
required:
|
|
- complete_datetime
|
|
- start_datetime
|
|
properties:
|
|
complete_datetime:
|
|
type: string
|
|
format: date-time
|
|
start_datetime:
|
|
type: string
|
|
format: date-time
|
|
prediction:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- stage
|
|
- trajectory
|
|
properties:
|
|
stage:
|
|
type: string
|
|
enum: ["ascent", "descent"]
|
|
trajectory:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- datetime
|
|
- latitude |