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.
Add docs for delete and update endpoints of agent (#63)
- Loading branch information
1 parent
82c87f3
commit c3fc7db
Showing
3 changed files
with
134 additions
and
2 deletions.
There are no files selected for viewing
103 changes: 103 additions & 0 deletions
103
public/docs/components/paths/agent/delete-and-update.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,103 @@ | ||
delete: | ||
tags: | ||
- Agentes | ||
summary: Apaga um agente | ||
description: Apaga um agente | ||
parameters: | ||
- in: path | ||
name: id | ||
schema: | ||
type: integer | ||
required: true | ||
description: Identificador do agente | ||
responses: | ||
'200': | ||
description: Informações sobre o agente apagado | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
'@entityType': | ||
type: string | ||
example: agent | ||
description: Tipo de entidade | ||
id: | ||
type: integer | ||
example: 5 | ||
description: Um id numérico que representa o agente | ||
name: | ||
type: string | ||
example: "Nome do agente" | ||
description: Um texto que representa o nome do agente | ||
type: | ||
type: object | ||
properties: | ||
id: | ||
type: integer | ||
example: 1 | ||
description: ID do tipo de agente (1 - Individual, 2 - Coletivo) | ||
name: | ||
type: string | ||
example: "Individual" | ||
description: Nome do tipo de agente | ||
status: | ||
type: integer | ||
example: -10 | ||
description: Status do agente | ||
'404': | ||
$ref: '../../responses/error/404.yaml' | ||
|
||
patch: | ||
tags: | ||
- Agentes | ||
summary: Atualiza um agente | ||
description: Atualiza parcialmente um agente | ||
parameters: | ||
- in: path | ||
name: id | ||
schema: | ||
type: integer | ||
required: true | ||
description: Identificador do agente | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../requestBodies/agent/patch.yaml' | ||
responses: | ||
'200': | ||
description: O agente atualizado | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/agent.yaml' | ||
'404': | ||
$ref: '../../responses/error/404.yaml' | ||
|
||
put: | ||
tags: | ||
- Agentes | ||
summary: Atualiza um agente | ||
description: Atualiza completamente um agente | ||
parameters: | ||
- in: path | ||
name: id | ||
schema: | ||
type: integer | ||
required: true | ||
description: Identificador do agente | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../requestBodies/agent/patch.yaml' | ||
responses: | ||
'200': | ||
description: O agente atualizado | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/agent.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,27 @@ | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
example: "Novo nome" | ||
description: Um texto que representa o novo nome do agente | ||
shortDescription: | ||
type: string | ||
example: "Uma breve descrição do agente" | ||
description: Uma breve descrição do agente | ||
status: | ||
type: integer | ||
example: 1 | ||
description: Status do agente | ||
type: | ||
type: integer | ||
example: 2 | ||
description: ID do tipo de agente (1 - Individual, 2 - Coletivo) | ||
terms: | ||
type: object | ||
properties: | ||
area: | ||
type: array | ||
items: | ||
type: string | ||
example: [ "Antropologia" ] | ||
description: Áreas relacionadas ao agente |
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