Created
October 20, 2020 03:08
-
-
Save edgars/cba66df2807cebf38dd35364f49c16e7 to your computer and use it in GitHub Desktop.
Livro_Jornada_Microservices
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
openapi: 3.0.2 | |
info: | |
title: Jornada_Micro_Servicos | |
version: 1.0.0 | |
description: API de Exemplo do Livro | |
paths: | |
/funcionarios: | |
summary: Path used to manage the list of funcionarios. | |
description: >- | |
The REST endpoint/path used to list and create zero or more `funcionario` entities. This path | |
contains a `GET` and `POST` operation to perform the list and create tasks, respectively. | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
$ref: '#/components/schemas/funcionario' | |
description: Successful response - returns an array of `funcionario` entities. | |
operationId: getfuncionarios | |
summary: List All funcionarios | |
description: Gets a list of all `funcionario` entities. | |
post: | |
requestBody: | |
description: A new `funcionario` to be created. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/funcionario' | |
required: true | |
responses: | |
'201': | |
description: Successful response. | |
operationId: createfuncionario | |
summary: Create a funcionario | |
description: Creates a new instance of a `funcionario`. | |
'/funcionarios/{funcionarioId}': | |
summary: Path used to manage a single funcionario. | |
description: >- | |
The REST endpoint/path used to get, update, and delete single instances of an `funcionario`. This | |
path contains `GET`, `PUT`, and `DELETE` operations used to perform the get, update, and delete | |
tasks, respectively. | |
get: | |
responses: | |
'200': | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/funcionario' | |
description: Successful response - returns a single `funcionario`. | |
operationId: getfuncionario | |
summary: Get a funcionario | |
description: Gets the details of a single instance of a `funcionario`. | |
put: | |
requestBody: | |
description: Updated `funcionario` information. | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/funcionario' | |
required: true | |
responses: | |
'202': | |
description: Successful response. | |
operationId: updatefuncionario | |
summary: Update a funcionario | |
description: Updates an existing `funcionario`. | |
delete: | |
responses: | |
'204': | |
description: Successful response. | |
operationId: deletefuncionario | |
summary: Delete a funcionario | |
description: Deletes an existing `funcionario`. | |
parameters: | |
- | |
name: funcionarioId | |
description: A unique identifier for a `funcionario`. | |
schema: | |
type: string | |
in: path | |
required: true | |
components: | |
schemas: | |
funcionario: | |
title: Root Type for funcionario | |
description: Dados do colaboradores da empresa (funcionario) | |
type: object | |
properties: | |
funcionario_id: | |
type: string | |
nome: | |
type: string | |
departamento: | |
type: string | |
salario: | |
format: int32 | |
type: integer | |
example: | |
funcionario_id: '11313131' | |
nome: Joseph Blinker | |
departamento: Vendas | |
salario: 1200 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment