233 lines
6.5 KiB
YAML
233 lines
6.5 KiB
YAML
openapi: 3.0.4
|
|
info:
|
|
title: Swagger GSN - OpenAPI 3.0
|
|
version: 0.0.1
|
|
paths:
|
|
/api/v1/subscription:
|
|
get:
|
|
tags:
|
|
- Subscriptions
|
|
summary: Get current subscriptions
|
|
operationId: GetSubscriptions
|
|
responses:
|
|
200:
|
|
description: Subscriptions list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- subscriptions
|
|
properties:
|
|
subscriptions:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- id
|
|
- type
|
|
- status
|
|
- created_at
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
type:
|
|
type: string
|
|
enum: ["station", "satellite"]
|
|
status:
|
|
type: string
|
|
enum: ["active", "offline", "busy"]
|
|
created_at:
|
|
type: string
|
|
format: date-time
|
|
default:
|
|
description: Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
delete:
|
|
tags:
|
|
- Subscriptions
|
|
summary: Remove subscription by subscription ID
|
|
operationId: Unsubscribe
|
|
parameters:
|
|
- name: id
|
|
in: query
|
|
schema:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: Succesful operation
|
|
default:
|
|
description: Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
/api/v1/station:
|
|
get:
|
|
tags:
|
|
- Stations
|
|
summary: Get available stations
|
|
operationId: GetStations
|
|
responses:
|
|
200:
|
|
description: Stations list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- stations
|
|
properties:
|
|
stations:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- id
|
|
- slug
|
|
- status
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
slug:
|
|
type: string
|
|
status:
|
|
type: string
|
|
enum: ["active", "offline", "busy"]
|
|
default:
|
|
description: Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
/api/v1/station/subscribe:
|
|
post:
|
|
tags:
|
|
- Stations
|
|
summary: Subscribe to a given station
|
|
operationId: SubscribeStation
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- id
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
description: Subscription ID
|
|
responses:
|
|
200:
|
|
description: Successful operation
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- id
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
default:
|
|
description: Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
/api/v1/satellite:
|
|
get:
|
|
tags:
|
|
- Satellites
|
|
summary: Get available satellites
|
|
operationId: GetSatellites
|
|
responses:
|
|
200:
|
|
description: Satellites list
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- stations
|
|
properties:
|
|
satellites:
|
|
type: array
|
|
items:
|
|
type: object
|
|
required:
|
|
- id
|
|
- display_name
|
|
- status
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
display_name:
|
|
type: string
|
|
status:
|
|
type: string
|
|
enum: ["active", "offline", "busy"]
|
|
default:
|
|
description: Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: "#/components/schemas/Error"
|
|
/api/v1/satellite/subscribe:
|
|
post:
|
|
tags:
|
|
- Satellites
|
|
summary: Subscribe to a given station
|
|
operationId: SubscribeSatellite
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- id
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
responses:
|
|
200:
|
|
description: Successful operation
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
required:
|
|
- id
|
|
properties:
|
|
id:
|
|
type: string
|
|
format: uuid
|
|
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
|