{ "name": "Competition API", "apidoc": { }, "info": { "contact": { "name": "Daniel Drescher", "email": "daniel.drescher@doclerholding.com" } }, "description": "A fictional API for ApiBuilder tool features testing.", "namespace": "namespace", "base_url": "competition-api.product-domain.com", "headers": [], "attributes": [], "annotations": {}, "enums": { "competition_status": { "description": "The actual status of the competition.", "values": [ { "name": "pending", "description": "Prepared competition, waiting for start." }, { "name": "active", "description": "Currently active(running) competition." }, { "name": "closed", "description": "Already closed competition." } ] }, "vote_type": { "description": "The actual status of the competition.", "values": [ { "name": "basic", "description": "Basic vote." }, { "name": "premium", "description": "Premium vote." } ] }, "app_sort_by": { "values": [ { "name": "name" }, { "name": "created_at" }, { "name": "updated_at" }, { "name": "competition_status" } ] }, "sort_order": { "values": [ { "name": "asc" }, { "name": "desc" } ] } }, "models": { "competition": { "description": "A competition is a race game for the competitors to collect more vote points. ", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this competition." }, { "name": "name", "type": "string", "required": true }, { "name": "status", "type": "competition_status" }, { "name": "start_at", "type": "date-time-iso8601" }, { "name": "end_at", "type": "date-time-iso8601" }, { "name": "created_at", "type": "date-time-iso8601" }, { "name": "updated_at", "type": "date-time-iso8601" } ] }, "competitor": { "description": "The competitor can who can participate in a competition.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this competitor." }, { "name": "name", "type": "string" } ] }, "competition_participant": { "description": "The competition participant is a competitor who is playing in a specific competition and he/she be able to win that.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this competition_participant." }, { "name": "competition_id", "type": "uuid" }, { "name": "competitor_id", "type": "uuid" } ] }, "voter": { "description": "The voter can vote for competition_participant.", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this voter." }, { "name": "name", "type": "string" }, { "name": "asdf", "type": "string" } ] }, "vote": { "description": "The vote is created by voter and it concern for a competition_participant", "fields": [ { "name": "guid", "type": "uuid", "description": "Internal unique identifier for this voter." }, { "name": "competition_participant_id", "type": "uuid" }, { "name": "voter_id", "type": "uuid" }, { "name": "type", "type": "string" }, { "name": "points", "type": "integer" } ] } }, "resources": { "competition": { "description": "Public resource that can responsible for competitions create, read, start, stop.", "operations": [ { "method": "POST", "body": { "type": "competition" }, "responses": { "201": { "type": "competition" } } }, { "method": "GET", "path": "/:id", "responses": { "200": { "type": "competition" } } } ] }, "competitor": { "description": "Public resource that can responsible for competitor create and read.", "operations": [ { "method": "POST", "body": { "type": "competitor" }, "responses": { "201": { "type": "competitor" } } }, { "method": "GET", "path": "/:id", "responses": { "200": { "type": "competitor" } } } ] } } }