create user _index and _entity endpoint

This commit is contained in:
2021-06-26 10:41:22 +02:00
parent aa5c7f333e
commit aaa9a1ec7b
3 changed files with 80 additions and 1 deletions

View File

@@ -10,6 +10,19 @@ servers:
components:
schemas:
User:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- user
username:
type: string
text:
type: string
Center:
type: object
properties:
@@ -425,3 +438,38 @@ paths:
description: "not found"
401:
description: "Unauthorized"
/1.0/main/user.json:
get:
tags:
- user
summary: Return a list of all user
responses:
200:
description: "ok"
/1.0/main/user/{id}.json:
get:
tags:
- user
summary: Return a user by id
parameters:
- name: id
in: path
required: true
description: The user id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "ok"
content:
application/json:
schema:
$ref: '#/components/schemas/User'
404:
description: "not found"
401:
description: "Unauthorized"