{ "openapi" : "3.0.3", "info" : { "title" : "Competition API From Swagger", "version" : "0.0.1-swagger", "description" : "A fictional API for ApiBuilder tool features testing." }, "paths" : { "/competitions" : { "post" : { "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DaniTestCompetitionApiFromSwaggerV0ModelsCompetition" } } }, "required" : true }, "responses" : { "201" : { "description" : "201 response", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DaniTestCompetitionApiFromSwaggerV0ModelsCompetition" } } } } } } }, "/competitions/{id}" : { "get" : { "parameters" : [ { "name" : "id", "in" : "path", "required" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "200 response", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DaniTestCompetitionApiFromSwaggerV0ModelsCompetition" } } } } } } }, "/competitors" : { "post" : { "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DaniTestCompetitionApiFromSwaggerV0ModelsCompetitor" } } }, "required" : true }, "responses" : { "201" : { "description" : "201 response", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DaniTestCompetitionApiFromSwaggerV0ModelsCompetitor" } } } } } } }, "/competitors/{id}" : { "get" : { "parameters" : [ { "name" : "id", "in" : "path", "required" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "200 response", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/DaniTestCompetitionApiFromSwaggerV0ModelsCompetitor" } } } } } } } }, "components" : { "schemas" : { "DaniTestCompetitionApiFromSwaggerV0ModelsVoter" : { "description" : "The voter can vote for competition_participant.", "type" : "object", "required" : [ "guid", "name" ], "properties" : { "guid" : { "description" : "Internal unique identifier for this voter.", "type" : "string", "format" : "uuid" }, "name" : { "type" : "string" } } }, "DaniTestCompetitionApiFromSwaggerV0ModelsVote" : { "description" : "The vote is created by voter and it concern for a competition_participant", "type" : "object", "required" : [ "guid", "competition_participant_id", "voter_id", "type", "points" ], "properties" : { "guid" : { "description" : "Internal unique identifier for this voter.", "type" : "string", "format" : "uuid" }, "competition_participant_id" : { "type" : "string", "format" : "uuid" }, "voter_id" : { "type" : "string", "format" : "uuid" }, "type" : { "type" : "string" }, "points" : { "type" : "integer", "format" : "int32" } } }, "DaniTestCompetitionApiFromSwaggerV0ModelsCompetitionParticipant" : { "description" : "The competition participant is a competitor who is playing in a specific competition and he/she be able to win that.", "type" : "object", "required" : [ "guid", "competition_id", "competitor_id" ], "properties" : { "guid" : { "description" : "Internal unique identifier for this competition_participant.", "type" : "string", "format" : "uuid" }, "competition_id" : { "type" : "string", "format" : "uuid" }, "competitor_id" : { "type" : "string", "format" : "uuid" } } }, "DaniTestCompetitionApiFromSwaggerV0ModelsCompetitor" : { "description" : "The competitor can who can participate in a competition.", "type" : "object", "required" : [ "guid", "name" ], "properties" : { "guid" : { "description" : "Internal unique identifier for this competitor.", "type" : "string", "format" : "uuid" }, "name" : { "type" : "string" } } }, "DaniTestCompetitionApiFromSwaggerV0ModelsCompetition" : { "description" : "A competition is a race game for the competitors to collect more vote points.", "type" : "object", "required" : [ "guid", "status", "start_at", "end_at", "created_at", "updated_at" ], "properties" : { "guid" : { "description" : "Internal unique identifier for this competition.", "type" : "string", "format" : "uuid" }, "name" : { "type" : "string" }, "status" : { "$ref" : "#/components/schemas/DaniTestCompetitionApiFromSwaggerV0EnumsCompetitionStatus" }, "start_at" : { "type" : "string", "format" : "date-time" }, "end_at" : { "type" : "string", "format" : "date-time" }, "created_at" : { "type" : "string", "format" : "date-time" }, "updated_at" : { "type" : "string", "format" : "date-time" } } }, "DaniTestCompetitionApiFromSwaggerV0EnumsCompetitionStatus" : { "type" : "string", "enum" : [ "pending", "active", "closed" ] } } } }