forked from mapasculturais/mapasculturais
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds documentation of seals crate, update and delete. (#61)
- Loading branch information
1 parent
df823b6
commit 9068f1e
Showing
7 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
18
public/docs/components/requestBodies/seal/post-minimal.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters