Skip to content

Instantly share code, notes, and snippets.

@thiagosbrito
Created March 30, 2016 17:39
Show Gist options
  • Save thiagosbrito/ade6841b6c39730eecdc8e24040d9c76 to your computer and use it in GitHub Desktop.
Save thiagosbrito/ade6841b6c39730eecdc8e24040d9c76 to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"description": "Api Documentation",
"version": "1.0",
"title": "Api Documentation",
"termsOfService": "urn:tos",
"contact": {},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0"
}
},
"host": "localhost:8080",
"basePath": "/",
"tags": [
{
"name": "hierarquia-api",
"description": "Hierarquia Api"
},
{
"name": "plataforma-api",
"description": "Plataforma Api"
}
],
"paths": {
"/v1/hierarquias": {
"get": {
"tags": [
"hierarquia-api"
],
"summary": "getAllHierarquias",
"operationId": "getAllHierarquiasUsingGET",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
},
"post": {
"tags": [
"hierarquia-api"
],
"summary": "novaHierarquia",
"operationId": "novaHierarquiaUsingPOST",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "hierarquiaRepresentation",
"description": "hierarquiaRepresentation",
"required": true,
"schema": {
"$ref": "#/definitions/HierarquiaRepresentation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
},
"put": {
"tags": [
"hierarquia-api"
],
"summary": "atualizaHierarquia",
"operationId": "atualizaHierarquiaUsingPUT",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "hierarquiaRepresentation",
"description": "hierarquiaRepresentation",
"required": true,
"schema": {
"$ref": "#/definitions/HierarquiaRepresentation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1/hierarquias/{id}": {
"get": {
"tags": [
"hierarquia-api"
],
"summary": "getHierarquiaById",
"operationId": "getHierarquiaByIdUsingGET",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "id",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
},
"/v1/plataformas": {
"get": {
"tags": [
"plataforma-api"
],
"summary": "getAllPlataformas",
"operationId": "getAllPlataformasUsingGET",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
},
"post": {
"tags": [
"plataforma-api"
],
"summary": "novaPlataforma",
"operationId": "novaPlataformaUsingPOST",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "plataformaRepresentation",
"description": "plataformaRepresentation",
"required": true,
"schema": {
"$ref": "#/definitions/PlataformaRepresentation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
},
"put": {
"tags": [
"plataforma-api"
],
"summary": "atualizaPlataforma",
"operationId": "atualizaPlataformaUsingPUT",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "plataformaRepresentation",
"description": "plataformaRepresentation",
"required": true,
"schema": {
"$ref": "#/definitions/PlataformaRepresentation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"201": {
"description": "Created"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
},
"delete": {
"tags": [
"plataforma-api"
],
"summary": "deletaPlataforma",
"operationId": "deletaPlataformaUsingDELETE",
"consumes": [
"application/json"
],
"produces": [
"*/*"
],
"parameters": [
{
"in": "body",
"name": "plataformaRepresentation",
"description": "plataformaRepresentation",
"required": true,
"schema": {
"$ref": "#/definitions/PlataformaRepresentation"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"204": {
"description": "No Content"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
}
}
}
},
"/v1/plataformas/{id}": {
"get": {
"tags": [
"plataforma-api"
],
"summary": "getPlataformaById",
"operationId": "getPlataformaByIdUsingGET",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "id",
"required": true,
"type": "integer",
"format": "int64"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
}
}
}
}
},
"definitions": {
"HierarquiaRepresentation": {
"type": "object",
"properties": {
"ativo": {
"type": "boolean"
},
"hierarquia": {
"type": "array",
"items": {
"$ref": "#/definitions/HierarquiaRepresentation"
}
},
"hierarquiaPai": {
"$ref": "#/definitions/HierarquiaRepresentation"
},
"nome": {
"type": "string"
},
"tipoHierarquia": {
"type": "string"
},
"uuid": {
"type": "integer",
"format": "int64"
},
"uuidCedente": {
"type": "integer",
"format": "int64"
},
"uuidPlataforma": {
"type": "integer",
"format": "int64"
},
"uuidUsuario": {
"type": "integer",
"format": "int64"
}
}
},
"PlataformaRepresentation": {
"type": "object",
"properties": {
"ativo": {
"type": "boolean"
},
"descricao": {
"type": "string"
},
"nome": {
"type": "string"
},
"uuid": {
"type": "integer",
"format": "int64"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment