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.
created docs on create, patch and delete event (#65)
- Loading branch information
1 parent
f58e7c4
commit cd67c1b
Showing
6 changed files
with
139 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: | ||
- Eventos | ||
summary: Cria um evento | ||
description: Cria um novo evento com as informações fornecidas | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../requestBodies/event/post-minimal.yaml' | ||
responses: | ||
'201': | ||
description: Evento criado com sucesso | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/event.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,38 @@ | ||
delete: | ||
tags: | ||
- Eventos | ||
summary: Apaga um evento | ||
description: Apaga um evento baseado no ID fornecido. | ||
parameters: | ||
- in: path | ||
name: id | ||
schema: | ||
type: integer | ||
required: true | ||
description: Identificador único do evento. | ||
responses: | ||
'200': | ||
description: Informações sobre o evento apagado. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
'@entityType': | ||
type: string | ||
example: event | ||
description: Tipo de entidade. | ||
id: | ||
type: integer | ||
example: 10 | ||
description: Um id numérico que representa o evento. | ||
name: | ||
type: string | ||
example: "Festival de Verão" | ||
description: Nome do evento. | ||
status: | ||
type: integer | ||
example: -10 | ||
description: Status do evento após ser apagado. | ||
'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,29 @@ | ||
patch: | ||
tags: | ||
- Eventos | ||
summary: Atualiza um evento | ||
description: Atualiza os detalhes de um evento existente. | ||
parameters: | ||
- in: path | ||
name: id | ||
schema: | ||
type: integer | ||
required: true | ||
description: Identificador único do evento. | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../requestBodies/event/post-minimal.yaml' | ||
responses: | ||
'200': | ||
description: Evento atualizado com sucesso. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/event.yaml' | ||
'400': | ||
description: Requisição inválida, por exemplo, campos não preenchidos corretamente. | ||
'404': | ||
description: Evento não encontrado. | ||
$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,6 @@ | ||
tags: | ||
- Eventos | ||
patch: | ||
$ref: './patch.yaml' | ||
delete: | ||
$ref: './delete.yaml' |
45 changes: 45 additions & 0 deletions
45
public/docs/components/requestBodies/event/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,45 @@ | ||
post: | ||
tags: | ||
- Eventos | ||
summary: Cria um evento | ||
description: Cria um novo evento com as informações fornecidas | ||
requestBody: | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- name | ||
- shortDescription | ||
- classificacaoEtaria | ||
properties: | ||
name: | ||
type: string | ||
description: "Nome do evento" | ||
shortDescription: | ||
type: string | ||
description: "Descrição curta do evento" | ||
classificacaoEtaria: | ||
type: object | ||
properties: | ||
options: | ||
type: array | ||
items: | ||
type: string | ||
description: "Classificação etária do evento" | ||
term-linguagem: | ||
type: array | ||
items: | ||
type: string | ||
description: "Linguagens do evento" | ||
responses: | ||
'201': | ||
description: Evento criado com sucesso | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/event.yaml' | ||
'400': | ||
description: Dados inválidos fornecidos | ||
|
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