224 lines
5.6 KiB
YAML
224 lines
5.6 KiB
YAML
openapi: 3.0.3
|
||
info:
|
||
description: Announcing patchnotes for KanzleiApp
|
||
title: announcementService
|
||
version: 1.0.0
|
||
servers:
|
||
- url: /
|
||
tags:
|
||
- description: "Create, update and read patchnotes"
|
||
name: Patchnotes
|
||
paths:
|
||
/patchnotes:
|
||
get:
|
||
operationId: list_patchnotes
|
||
parameters:
|
||
- description: Only patchnotes newer than this date (YYYY-MM-DD)
|
||
explode: true
|
||
in: query
|
||
name: since
|
||
required: false
|
||
schema:
|
||
format: date
|
||
type: string
|
||
style: form
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
items:
|
||
$ref: '#/components/schemas/patch_notes'
|
||
type: array
|
||
description: list of patch notes
|
||
"404":
|
||
description: no Patch notes found
|
||
summary: Returns list of patch notes newer than the caller’s last login
|
||
tags:
|
||
- Patchnotes
|
||
x-openapi-router-controller: openapi_server.controllers.patchnotes_controller
|
||
post:
|
||
operationId: create_patchnote
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/patch_notes_input'
|
||
required: true
|
||
responses:
|
||
"201":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/patch_notes'
|
||
description: patch note created
|
||
headers:
|
||
Location:
|
||
description: URL of the newly created patch note
|
||
explode: false
|
||
schema:
|
||
type: string
|
||
style: simple
|
||
"400":
|
||
description: bad payload
|
||
summary: Creates new patch notes
|
||
tags:
|
||
- Patchnotes
|
||
x-openapi-router-controller: openapi_server.controllers.patchnotes_controller
|
||
/patchnotes/{patchID}:
|
||
delete:
|
||
operationId: delete_patchnote
|
||
parameters:
|
||
- description: ID of the patch note
|
||
explode: false
|
||
in: path
|
||
name: patchID
|
||
required: true
|
||
schema:
|
||
format: uuid
|
||
type: string
|
||
style: simple
|
||
responses:
|
||
"204":
|
||
description: patch successfully deleted
|
||
"404":
|
||
description: patch not found
|
||
summary: Deletes one patch note
|
||
tags:
|
||
- Patchnotes
|
||
x-openapi-router-controller: openapi_server.controllers.patchnotes_controller
|
||
get:
|
||
operationId: get_patchnote
|
||
parameters:
|
||
- description: ID of the patch note
|
||
explode: false
|
||
in: path
|
||
name: patchID
|
||
required: true
|
||
schema:
|
||
format: uuid
|
||
type: string
|
||
style: simple
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/patch_notes'
|
||
description: single patch note
|
||
"404":
|
||
description: no patch note found
|
||
summary: Returns one patch note
|
||
tags:
|
||
- Patchnotes
|
||
x-openapi-router-controller: openapi_server.controllers.patchnotes_controller
|
||
put:
|
||
operationId: update_patchnote
|
||
parameters:
|
||
- description: ID of the patch note
|
||
explode: false
|
||
in: path
|
||
name: patchID
|
||
required: true
|
||
schema:
|
||
format: uuid
|
||
type: string
|
||
style: simple
|
||
requestBody:
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/patch_notes_input'
|
||
required: true
|
||
responses:
|
||
"200":
|
||
content:
|
||
application/json:
|
||
schema:
|
||
$ref: '#/components/schemas/patch_notes'
|
||
description: patch updated
|
||
"404":
|
||
description: no patch note found
|
||
summary: Updates one patch note (full replace)
|
||
tags:
|
||
- Patchnotes
|
||
x-openapi-router-controller: openapi_server.controllers.patchnotes_controller
|
||
components:
|
||
parameters:
|
||
SinceParam:
|
||
description: Only patchnotes newer than this date (YYYY-MM-DD)
|
||
explode: true
|
||
in: query
|
||
name: since
|
||
required: false
|
||
schema:
|
||
format: date
|
||
type: string
|
||
style: form
|
||
responses:
|
||
Error400:
|
||
description: Invalid request payload
|
||
Error404:
|
||
description: Resource not found
|
||
schemas:
|
||
patch_notes:
|
||
example:
|
||
patchID: 29e80bcc-5981-4a52-99e1-373442dea9b9
|
||
title: Patch note 1
|
||
changes: Fixed export bug
|
||
version: 1.0.0
|
||
patch_date: 2025-01-02
|
||
project: Test-Projekt
|
||
properties:
|
||
patchID:
|
||
format: uuid
|
||
type: string
|
||
title:
|
||
type: string
|
||
changes:
|
||
type: string
|
||
version:
|
||
type: string
|
||
patch_date:
|
||
format: date
|
||
type: string
|
||
project:
|
||
type: string
|
||
required:
|
||
- changes
|
||
- patchID
|
||
- patch_date
|
||
- project
|
||
- title
|
||
- version
|
||
title: patch_notes
|
||
type: object
|
||
patch_notes_input:
|
||
description: Schema for POST/PUT (server generates patchID if omitted)
|
||
example:
|
||
title: Patch note 1
|
||
changes: Fixed export bug
|
||
version: 1.0.0
|
||
patch_date: 2025-01-02
|
||
project: Test-Projekt
|
||
properties:
|
||
title:
|
||
type: string
|
||
changes:
|
||
type: string
|
||
version:
|
||
type: string
|
||
patch_date:
|
||
format: date
|
||
type: string
|
||
project:
|
||
type: string
|
||
required:
|
||
- changes
|
||
- patch_date
|
||
- project
|
||
- title
|
||
- version
|
||
title: patch_notes_input
|
||
type: object
|