{ "openapi" : "3.0.3", "info" : { "title" : "Competition API", "version" : "0.0.6-dev", "description" : "A fictional API for ApiBuilder tool features testing." }, "servers" : [ { "url" : "competition-api.product-domain.com" } ], "paths" : { "/competitions" : { "post" : { "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/NamespaceModelsCompetition" } } }, "required" : true }, "responses" : { "201" : { "description" : "Created", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/NamespaceModelsCompetition" } } } } } } }, "/competitions/{id}" : { "get" : { "parameters" : [ { "name" : "id", "in" : "path", "required" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "Successful response", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/NamespaceModelsCompetition" } } } } } } }, "/competitors" : { "post" : { "requestBody" : { "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/NamespaceModelsCompetitor" } } }, "required" : true }, "responses" : { "201" : { "description" : "Created", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/NamespaceModelsCompetitor" } } } } } } }, "/competitors/{id}" : { "get" : { "parameters" : [ { "name" : "id", "in" : "path", "required" : true, "schema" : { "type" : "string" } } ], "responses" : { "200" : { "description" : "Successful response", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/NamespaceModelsCompetitor" } } } } } } } }, "components" : { "schemas" : { "NamespaceModelsCompetition" : { "description" : "A competition is a race game for the competitors to collect more vote points.", "type" : "object", "required" : [ "guid", "name", "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/NamespaceEnumsCompetitionStatus" }, "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" } } }, "NamespaceModelsCompetitionParticipant" : { "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" } } }, "NamespaceModelsVoter" : { "description" : "The voter can vote for competition_participant.", "type" : "object", "required" : [ "guid", "name", "asdf" ], "properties" : { "guid" : { "description" : "Internal unique identifier for this voter.", "type" : "string", "format" : "uuid" }, "name" : { "type" : "string" }, "asdf" : { "type" : "string" } } }, "NamespaceModelsVote" : { "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" } } }, "NamespaceModelsCompetitor" : { "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" } } }, "NamespaceEnumsAppSortBy" : { "type" : "string", "enum" : [ "name", "created_at", "updated_at", "competition_status" ] }, "NamespaceEnumsCompetitionStatus" : { "description" : "The actual status of the competition.", "type" : "string", "enum" : [ "pending", "active", "closed" ] }, "NamespaceEnumsSortOrder" : { "type" : "string", "enum" : [ "asc", "desc" ] }, "NamespaceEnumsVoteType" : { "description" : "The actual status of the competition.", "type" : "string", "enum" : [ "basic", "premium" ] } } } }