extend openapi

This commit is contained in:
Tomas Groth 2024-04-16 22:19:47 +02:00
parent 41a62b22a1
commit 5af3737a4f
1 changed files with 171 additions and 24 deletions

View File

@ -1,6 +1,6 @@
openapi: 3.0.3
openapi: 3.1.0
info:
title: OpenLP Remote Sync Api - OpenAPI 3.0
title: OpenLP Remote Sync Api - OpenAPI 3.1
description: |-
This is the description for the OpenLP remote sync API.
@ -17,12 +17,12 @@ externalDocs:
description: Find out more about Swagger
url: http://swagger.io
servers:
- url: https://sync-service.openlp.io/api/v1
- url: http://localhost:8888/api/v1
tags:
- name: song
description: Operations about songs
paths:
/{churchId}/song/list:
/{churchId}/song-list:
get:
tags:
- song
@ -32,7 +32,7 @@ paths:
parameters:
- name: churchId
in: path
description: 'The id of the church.'
description: The id of the church.
required: true
schema:
type: string
@ -55,18 +55,18 @@ paths:
tags:
- song
summary: Get song by uuid
description: 'fwef'
description: fwef
operationId: getSong
parameters:
- name: churchId
in: path
description: 'The id of the church.'
description: The id of the church.
required: true
schema:
type: string
- name: uuid
in: path
description: 'The uuid of the song that needs to be fetched.'
description: The uuid of the song that needs to be fetched.
required: true
schema:
type: string
@ -93,7 +93,7 @@ paths:
parameters:
- name: churchId
in: path
description: 'The id of the church.'
description: The id of the church.
required: true
schema:
type: string
@ -127,7 +127,7 @@ paths:
parameters:
- name: churchId
in: path
description: 'The id of the church.'
description: The id of the church.
required: true
schema:
type: string
@ -142,7 +142,81 @@ paths:
description: Invalid uuid supplied
'404':
description: Song not found
/{churchId}/custom/list:
/{churchId}/song/{uuid}/{version}:
get:
tags:
- song
summary: Get song by uuid and version
description: Get song by uuid and version
operationId: getSongVersion
parameters:
- name: churchId
in: path
description: The id of the church.
required: true
schema:
type: string
- name: uuid
in: path
description: The uuid of the song that needs to be fetched.
required: true
schema:
type: string
- name: version
in: path
description: The version of the song that needs to be fetched.
required: true
schema:
type: integer
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/TextItem'
application/xml:
schema:
$ref: '#/components/schemas/TextItem'
'400':
description: Invalid uuid supplied
'404':
description: Song not found
/{churchId}/song-history/{uuid}:
get:
tags:
- song
summary: Get history of song by uuid
description: fwef
operationId: getSongHistory
parameters:
- name: churchId
in: path
description: The id of the church.
required: true
schema:
type: string
- name: uuid
in: path
description: The uuid of the song that needs to be fetched.
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/TextItem'
application/xml:
schema:
$ref: '#/components/schemas/TextItem'
'400':
description: Invalid uuid supplied
'404':
description: Song not found
/{churchId}/custom-list:
get:
tags:
- custom
@ -152,7 +226,7 @@ paths:
parameters:
- name: churchId
in: path
description: 'The id of the church.'
description: The id of the church.
required: true
schema:
type: string
@ -175,18 +249,18 @@ paths:
tags:
- custom
summary: Get custom slide by uuid
description: 'fwef'
description: fwef
operationId: getCustomslide
parameters:
- name: churchId
in: path
description: 'The id of the church.'
description: The id of the church.
required: true
schema:
type: string
- name: uuid
in: path
description: 'The uuid of the custom slide that needs to be fetched.'
description: The uuid of the custom slide that needs to be fetched.
required: true
schema:
type: string
@ -213,7 +287,7 @@ paths:
parameters:
- name: churchId
in: path
description: 'The id of the church.'
description: The id of the church.
required: true
schema:
type: string
@ -247,7 +321,7 @@ paths:
parameters:
- name: churchId
in: path
description: 'The id of the church.'
description: The id of the church.
required: true
schema:
type: string
@ -262,7 +336,80 @@ paths:
description: Invalid uuid supplied
'404':
description: Custom slide not found
/{churchId}/custom/{uuid}/{version}:
get:
tags:
- custom
summary: Get custom slide by uuid and version
description: fwef
operationId: getCustomslideVersion
parameters:
- name: churchId
in: path
description: The id of the church.
required: true
schema:
type: string
- name: uuid
in: path
description: The uuid of the custom slide that needs to be fetched.
required: true
schema:
type: string
- name: version
in: path
description: The version of the custom slide that needs to be fetched.
required: true
schema:
type: integer
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/TextItem'
application/xml:
schema:
$ref: '#/components/schemas/TextItem'
'400':
description: Invalid uuid supplied
'404':
description: Custom slide not found
/{churchId}/custom-history/{uuid}:
get:
tags:
- custom
summary: Get history of custom slide by uuid
description: Get history of custom slide by uuid
operationId: getCustomslideHistory
parameters:
- name: churchId
in: path
description: The id of the church.
required: true
schema:
type: string
- name: uuid
in: path
description: The uuid of the custom slide that needs to be fetched.
required: true
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/TextItem'
application/xml:
schema:
$ref: '#/components/schemas/TextItem'
'400':
description: Invalid uuid supplied
'404':
description: Custom slide not found
components:
schemas:
TextItem:
@ -270,11 +417,11 @@ components:
properties:
uuid:
type: string
example: 43f74822-c620-40c7-8723-0136878bab23
examples: ['43f74822-c620-40c7-8723-0136878bab23']
version:
type: integer
format: int32
example: 2
examples: [2]
created:
type: string
format: date-time
@ -283,11 +430,11 @@ components:
format: date-time
title:
type: string
example: Text item title
examples: ['Text item title']
itemxml:
type: string
description: Text item xml
example: <xml>dsf</xml>
examples: ['<xml>dsf</xml>']
xml:
name: textitem
ItemList:
@ -302,11 +449,11 @@ components:
properties:
uuid:
type: string
example: 43f74822-c620-40c7-8723-0136878bab23
examples: ['43f74822-c620-40c7-8723-0136878bab23']
version:
type: integer
format: int32
example: 2
examples: [2]
created:
type: string
format: date-time