Created
November 11, 2019 17:38
-
-
Save renanzulian/29d5e05ac3db3e9d616b897a8ca6f34a to your computer and use it in GitHub Desktop.
swagerjson
This file contains hidden or 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" : "This is a sample Petstore server. You can find \nout more about Swagger at \n[http://swagger.io](http://swagger.io) or on \n[irc.freenode.net, #swagger](http://swagger.io/irc/).\n", | |
| "version" : "1.0.0", | |
| "title" : "BigFUT", | |
| "termsOfService" : "http://swagger.io/terms/", | |
| "contact" : { | |
| "email" : "[email protected]" | |
| }, | |
| "license" : { | |
| "name" : "Apache 2.0", | |
| "url" : "http://www.apache.org/licenses/LICENSE-2.0.html" | |
| } | |
| }, | |
| "host" : "virtserver.swaggerhub.com", | |
| "basePath" : "/nailuz/ProjetoIntegradorAPI/1.0.0", | |
| "tags" : [ { | |
| "name" : "jogadores", | |
| "description" : "Tudo sobre os jogadores" | |
| }, { | |
| "name" : "times", | |
| "description" : "Tudo sobre os times" | |
| }, { | |
| "name" : "competicoes", | |
| "description" : "Tudo sobre as competicoes e jogos" | |
| } ], | |
| "schemes" : [ "https", "http" ], | |
| "paths" : { | |
| "/jogadores" : { | |
| "get" : { | |
| "tags" : [ "jogadores" ], | |
| "summary" : "Busca dados de todos os jogadores", | |
| "operationId" : "buscarJogadores", | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Sucesso na operação", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/Jogadores" | |
| } | |
| } | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| }, | |
| "post" : { | |
| "tags" : [ "jogadores" ], | |
| "summary" : "Incluir novo jogador", | |
| "operationId" : "adicionarJogador", | |
| "consumes" : [ "application/json" ], | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "in" : "body", | |
| "name" : "body", | |
| "description" : "Informe os dados para cadastro", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/Jogadores" | |
| } | |
| } ], | |
| "responses" : { | |
| "201" : { | |
| "description" : "Jogador Incluído" | |
| }, | |
| "400" : { | |
| "description" : "Esta faltando informações sobre o jogador" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| } | |
| }, | |
| "/jogadores/{id_jogador}" : { | |
| "get" : { | |
| "tags" : [ "jogadores" ], | |
| "summary" : "Busca os dados de um jogador pelo seu ID.", | |
| "operationId" : "buscaJogador", | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_jogador", | |
| "in" : "path", | |
| "description" : "Id do jogador que desejas buscar", | |
| "required" : true, | |
| "type" : "integer" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Sucesso na operação", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/Jogadores" | |
| } | |
| } | |
| }, | |
| "400" : { | |
| "description" : "Invalid status value" | |
| } | |
| } | |
| }, | |
| "delete" : { | |
| "tags" : [ "jogadores" ], | |
| "summary" : "Aposenta um determinado jogadores", | |
| "operationId" : "aposentaJogador", | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_jogador", | |
| "in" : "path", | |
| "description" : "Id do jogador que deseja deletar", | |
| "required" : true, | |
| "type" : "integer" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "OK" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| }, | |
| "patch" : { | |
| "tags" : [ "jogadores" ], | |
| "summary" : "Atualiza dados dos jogadores", | |
| "operationId" : "atualizaJogador", | |
| "consumes" : [ "application/json" ], | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_jogador", | |
| "in" : "path", | |
| "description" : "Id do jogador que deseja atualizar", | |
| "required" : true, | |
| "type" : "integer" | |
| }, { | |
| "in" : "body", | |
| "name" : "body", | |
| "description" : "Informe os dados para atualizar", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/Jogadores" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Sucesso na operação" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| } | |
| }, | |
| "/times" : { | |
| "get" : { | |
| "tags" : [ "times" ], | |
| "summary" : "Busca dados de todos os times", | |
| "operationId" : "buscarTimes", | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "OK", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/Times" | |
| } | |
| } | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| }, | |
| "post" : { | |
| "tags" : [ "times" ], | |
| "summary" : "Incluir novo time", | |
| "operationId" : "adicionarTime", | |
| "consumes" : [ "application/json" ], | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "in" : "body", | |
| "name" : "body", | |
| "description" : "Informe os dados para cadastro", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/Times" | |
| } | |
| } ], | |
| "responses" : { | |
| "201" : { | |
| "description" : "Time Incluído" | |
| }, | |
| "400" : { | |
| "description" : "Esta faltando informações sobre o time" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| } | |
| }, | |
| "/times/{id_time}" : { | |
| "get" : { | |
| "tags" : [ "times" ], | |
| "summary" : "Buscar dados de um time pelo id", | |
| "operationId" : "buscarTime", | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_time", | |
| "in" : "path", | |
| "description" : "Id do time que desejas buscar", | |
| "required" : true, | |
| "type" : "integer" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "OK", | |
| "schema" : { | |
| "type" : "array", | |
| "items" : { | |
| "$ref" : "#/definitions/Times" | |
| } | |
| } | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| }, | |
| "delete" : { | |
| "tags" : [ "times" ], | |
| "summary" : "Deleta um time", | |
| "operationId" : "deletarTime", | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_time", | |
| "in" : "path", | |
| "description" : "Id do time que deseja deletar", | |
| "required" : true, | |
| "type" : "integer" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "OK" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| }, | |
| "patch" : { | |
| "tags" : [ "times" ], | |
| "summary" : "Atualizar informações de um time", | |
| "operationId" : "atualizarTime", | |
| "consumes" : [ "application/json" ], | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_time", | |
| "in" : "path", | |
| "description" : "Id do time que deseja atualizar", | |
| "required" : true, | |
| "type" : "integer" | |
| }, { | |
| "in" : "body", | |
| "name" : "body", | |
| "description" : "Informe os dados para atualizar", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/Times" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Sucesso na operação" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| } | |
| }, | |
| "/times/{id_time}/comprar" : { | |
| "post" : { | |
| "tags" : [ "times" ], | |
| "summary" : "Comprar um novo jogador", | |
| "operationId" : "comprarJogador", | |
| "consumes" : [ "application/json" ], | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_time", | |
| "in" : "path", | |
| "description" : "Id do time que ira realizar a compra", | |
| "required" : true, | |
| "type" : "integer" | |
| }, { | |
| "in" : "body", | |
| "name" : "body", | |
| "description" : "Informe o id e o preço do jogador a ser comprado", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/Times" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Sucesso na operação" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| } | |
| }, | |
| "/competicoes" : { | |
| "get" : { | |
| "tags" : [ "competicoes" ], | |
| "summary" : "Traz um resumo do campeonato", | |
| "operationId" : "buscarCompeticao", | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "OK" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| }, | |
| "post" : { | |
| "tags" : [ "competicoes" ], | |
| "summary" : "Inicia uma nova competição", | |
| "operationId" : "iniciarCompeticao", | |
| "consumes" : [ "application/json" ], | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "in" : "body", | |
| "name" : "body", | |
| "description" : "Informe os dados para iniciar a competição", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/Competicoes" | |
| } | |
| } ], | |
| "responses" : { | |
| "201" : { | |
| "description" : "Competicao gerada" | |
| }, | |
| "400" : { | |
| "description" : "Esta faltando informações sobre a competicao" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| } | |
| }, | |
| "/competicoes/jogos/{id_jogo}" : { | |
| "get" : { | |
| "tags" : [ "competicoes" ], | |
| "summary" : "Buscar dados de um jogo", | |
| "operationId" : "buscarJogo", | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_jogo", | |
| "in" : "path", | |
| "description" : "Id do jogo que desejas buscar", | |
| "required" : true, | |
| "type" : "integer" | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "OK" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| }, | |
| "post" : { | |
| "tags" : [ "competicoes" ], | |
| "summary" : "Realizar um jogo", | |
| "operationId" : "realizarJogo", | |
| "consumes" : [ "application/json" ], | |
| "produces" : [ "application/json" ], | |
| "parameters" : [ { | |
| "name" : "id_jogo", | |
| "in" : "path", | |
| "description" : "Id do jogo", | |
| "required" : true, | |
| "type" : "integer" | |
| }, { | |
| "in" : "body", | |
| "name" : "body", | |
| "description" : "Informe os dados para iniciar o jogo", | |
| "required" : true, | |
| "schema" : { | |
| "$ref" : "#/definitions/Jogos" | |
| } | |
| } ], | |
| "responses" : { | |
| "200" : { | |
| "description" : "Sucesso na operação" | |
| }, | |
| "500" : { | |
| "description" : "Problemas de conexão com o banco" | |
| } | |
| } | |
| } | |
| } | |
| }, | |
| "definitions" : { | |
| "Jogadores" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id_jogador" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "id_time" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "nome" : { | |
| "type" : "string" | |
| }, | |
| "nascimento" : { | |
| "type" : "string", | |
| "format" : "date-time" | |
| }, | |
| "posicao" : { | |
| "type" : "string", | |
| "description" : "As posições são goleiro, defensor, meio campista e atacante.", | |
| "enum" : [ "G", "D", "M", "A" ] | |
| }, | |
| "valor" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "finalizacao" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "cabeceio" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "passe" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "cruzamento" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "marcacao" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "fisico" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| } | |
| } | |
| }, | |
| "Times" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id_times" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "id_competicao" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "saldo" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "estado" : { | |
| "type" : "string" | |
| }, | |
| "cores" : { | |
| "type" : "string" | |
| }, | |
| "nome" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "Competicoes" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id_competicao" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "nome" : { | |
| "type" : "string" | |
| } | |
| } | |
| }, | |
| "Jogos" : { | |
| "type" : "object", | |
| "properties" : { | |
| "id_jogo" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "id_competicao" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "id_time_casa" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "id_time_visitante" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "gols_casa" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "gols_visitante" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| }, | |
| "publico" : { | |
| "type" : "integer", | |
| "format" : "int64" | |
| } | |
| } | |
| } | |
| }, | |
| "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