Created
March 18, 2021 01:03
-
-
Save robsongomes/64590cdc6f019feea1bf164d83e1dc85 to your computer and use it in GitHub Desktop.
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
swagger: "2.0" | |
info: | |
description: "Serviço de Instalação" | |
version: "1.0.0" | |
title: "Serviço de Instalação" | |
termsOfService: "http://swagger.io/terms/" | |
contact: | |
email: "apiteam@swagger.io" | |
license: | |
name: "Apache 2.0" | |
url: "http://www.apache.org/licenses/LICENSE-2.0.html" | |
host: "igti.com.br" | |
basePath: "/v1" | |
tags: | |
- name: "cliente" | |
description: "Gerenciamento de Instalações" | |
schemes: | |
- "https" | |
- "http" | |
paths: | |
/instalacao: | |
post: | |
summary: "Adiciona uma instalação" | |
description: "" | |
operationId: "criarInstalacao" | |
consumes: | |
- "application/json" | |
- "application/xml" | |
produces: | |
- "application/xml" | |
- "application/json" | |
parameters: | |
- in: "body" | |
name: "body" | |
description: "Objeto instalação a ser adicionado no sistema" | |
required: true | |
schema: | |
$ref: "#/definitions/Instalacao" | |
responses: | |
"405": | |
description: "Invalid input" | |
put: | |
summary: "Altera uma instalação existente" | |
description: "" | |
operationId: "alterarInstalacao" | |
consumes: | |
- "application/json" | |
- "application/xml" | |
produces: | |
- "application/xml" | |
- "application/json" | |
parameters: | |
- in: "body" | |
name: "body" | |
description: "Objeto instalação a ser alterado no sistema" | |
required: true | |
schema: | |
$ref: "#/definitions/Instalacao" | |
responses: | |
"400": | |
description: "Id informado inválido" | |
"404": | |
description: "Instalação não encontrada" | |
"405": | |
description: "Erro de validação" | |
get: | |
summary: "Lista instalações cadastradas" | |
operationId: "getAllInstalacoes" | |
produces: | |
- "application/xml" | |
- "application/json" | |
responses: | |
"200": | |
description: "successful operation" | |
schema: | |
type: "array" | |
items: | |
$ref: "#/definitions/Instalacao" | |
"400": | |
description: "Sem registros para o CPF informado" | |
/instalacao/{codigo}: | |
get: | |
summary: "Lista instalações cadastradas" | |
operationId: "getInstalacao" | |
produces: | |
- "application/xml" | |
- "application/json" | |
parameters: | |
- name: "codigo" | |
description: "Codigo da instalacao" | |
required: true | |
in: "path" | |
type: "string" | |
responses: | |
"200": | |
description: "successful operation" | |
schema: | |
type: "array" | |
items: | |
$ref: "#/definitions/Instalacao" | |
"400": | |
description: "Sem registros para o CPF informado" | |
/instalacao/findByCpf: | |
get: | |
summary: "Lista instalações por CPF" | |
operationId: "getInstalacaoPorCPF" | |
produces: | |
- "application/xml" | |
- "application/json" | |
parameters: | |
- name: "cpf" | |
description: "CPF a ser considerado no filtro" | |
required: true | |
in: "query" | |
type: "string" | |
responses: | |
"200": | |
description: "successful operation" | |
schema: | |
type: "array" | |
items: | |
$ref: "#/definitions/Instalacao" | |
"400": | |
description: "Sem registros para o CPF informado" | |
definitions: | |
Endereco: | |
type: "object" | |
required: | |
- "bairro" | |
- "cidade" | |
- "logradouro" | |
- "uf" | |
properties: | |
id: | |
type: "integer" | |
format: "int64" | |
bairro: | |
type: "string" | |
cidade: | |
type: "string" | |
logradouro: | |
type: "string" | |
numero: | |
type: "string" | |
uf: | |
type: "string" | |
xml: | |
name: "Endereco" | |
Instalacao: | |
type: "object" | |
required: | |
- "codigo" | |
- "cpf" | |
- "dataInstalacao" | |
- "endereco" | |
properties: | |
id: | |
type: "integer" | |
format: "int64" | |
cpf: | |
type: "string" | |
dataInstalacao: | |
type: "string" | |
endereco: | |
$ref: "#/definitions/Endereco" | |
xml: | |
name: "Instalacao" | |
externalDocs: | |
description: "Find out more about Swagger" | |
url: "http://swagger.io" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment