Skip to content

Commit

Permalink
Adds documentation of seals crate, update and delete. (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akellymourab authored Mar 21, 2024
1 parent df823b6 commit 9068f1e
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 0 deletions.
17 changes: 17 additions & 0 deletions public/docs/components/paths/seal/create.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
post:
tags:
- Selos
summary: Cria um selo
description: Cria um selo
requestBody:
content:
application/json:
schema:
$ref: '../../requestBodies/seal/post-minimal.yaml'
responses:
'200':
description: O selo criado
content:
application/json:
schema:
$ref: '../../schemas/seal.yaml'
41 changes: 41 additions & 0 deletions public/docs/components/paths/seal/delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
tags:
- Selos
summary: Apaga um selo
description: Apaga um selo
parameters:
- in: path
name: id
schema:
type: integer
required: true
description: Identificador do selo
responses:
'200':
description: Informações sobre o objeto apagado
content:
application/json:
schema:
type: object
properties:
'@entityType':
type: string
example: seal
description: Tipo de entidade
id:
type: integer
example: 3
description: Um id numérico que representa o selo
name:
type: string
example: selo teste
description: Um texto que representa o nome do selo
type:
type: integer
example: null
description: Tipo do selo
status:
type: integer
example: -10
description: Status do selo
'404':
$ref: '../../responses/error/404.yaml'
25 changes: 25 additions & 0 deletions public/docs/components/paths/seal/patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
tags:
- Selos
summary: Atualiza um selo
description: Atualiza um selo
parameters:
- in: path
name: id
schema:
type: integer
required: true
description: Identificador do selo
requestBody:
content:
application/json:
schema:
$ref: '../../requestBodies/seal/post-minimal.yaml'
responses:
'200':
description: O selo atualizado
content:
application/json:
schema:
$ref: '../../schemas/seal.yaml'
'404':
$ref: '../../responses/error/404.yaml'
30 changes: 30 additions & 0 deletions public/docs/components/paths/seal/put.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
tags:
- Selos
summary: Atualiza um selo
description: Atualiza um selo
parameters:
- in: put
name: id
schema:
type: integer
required: true
description: Identificador do selo
requestBody:
content:
application/json:
schema:
type: object
properties:
name:
type: string
example: Selo teste
description: Nome do selo
responses:
'200':
description: O selo atualizado
content:
application/json:
schema:
$ref: '../../schemas/seal.yaml'
'404':
$ref: '../../responses/error/404.yaml'
8 changes: 8 additions & 0 deletions public/docs/components/paths/seal/route-single-id.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
tags:
- Selos
patch:
$ref: './patch.yaml'
put:
$ref: './put.yaml'
delete:
$ref: './delete.yaml'
18 changes: 18 additions & 0 deletions public/docs/components/requestBodies/seal/post-minimal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
type: object
properties:
name:
type: string
example: Selo teste
description: Nome do Selo
shortDescription:
type: string
example: apenas um Selo teste
description: Uma breve descrição do Selo
validPeriod:
type: integer
example: 1
description: Período de validade do selo
owner:
type: integer
example: 1
description: Usuario proprietário do selo
4 changes: 4 additions & 0 deletions public/docs/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ paths:
$ref: './components/paths/seal/get-type-groups.yaml'
/api/seal/getTypes:
$ref: './components/paths/seal/get-types.yaml'
/seal/index:
$ref: './components/paths/seal/create.yaml'
/seal/single/{id}:
$ref: './components/paths/seal/route-single-id.yaml'
/api/space/describe:
$ref: './components/paths/space/describe.yaml'
/api/space/find:
Expand Down

0 comments on commit 9068f1e

Please sign in to comment.