diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2021-07-28 01:43:55 +0200 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2021-07-29 00:01:57 +0200 |
| commit | 1e874e790c12839695761a654b44fb427149a353 (patch) | |
| tree | 6942441ac511ec1417b2434b111101fa8d7f7e68 /schemas_openapi | |
init
Diffstat (limited to 'schemas_openapi')
| -rw-r--r-- | schemas_openapi/main.yaml | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/schemas_openapi/main.yaml b/schemas_openapi/main.yaml new file mode 100644 index 0000000..3c710e4 --- /dev/null +++ b/schemas_openapi/main.yaml @@ -0,0 +1,99 @@ +--- +openapi: 3.1.0 +info: + title: restlog + version: 0.0.1 +paths: + '/entries': + get: + parameters: + - name: source + in: query + - name: type + in: query + - name: last_entry_id + in: query + - max_results: + in: query + responses: + "200": + "$ref": "#/components/responses/entries" + default: + description: error + '/entry/{entry_id}': + get: + parameters: + - name: entry_id + in: path + required: true + responses: + "200": + "$ref": "#/components/responses/entry" + default: + description: error + '/entry/{source}/{type}': + post: + parameters: + - name: source + in: path + required: true + - name: type + in: path + required: true + requestBody: + content: + application/json: + schema: + description: entry data + responses: + "200": + "$ref": "#/components/responses/entry" + default: + description: error +components: + schemas: + entry: + type: object + required: + - entry_id + - timestamp + - address + - source + - type + - data + properties: + entry_id: + type: integer + timestamp: + type: number + address: + type: string + source: + type: string + type: + type: string + data: {} + responses: + entries: + decription: list of entries + content: + application/json: + schema: + type: object + required: + - entires + - more + properties: + entires: + type: array + items: + "$ref": "#/components/schemas/entry" + more: + type: boolean + entry: + decription: single entry + content: + application/json: + schema: + "$ref": "#/components/schemas/entry" +... |
