{"info":{"title":"Assessment API - Tincan AG","description":"Dummy REST API for the Tincan developer assessment. Authenticate with POST /api/v1/login to obtain a bearer token, then send it on protected routes via the Authorization header (`Bearer <token>`).","version":"1.0.2"},"tags":[{"name":"Auth","description":"Login and logout"},{"name":"Boards","description":"Surfboard lottery boards"},{"name":"Forms","description":"Form submissions"}],"security":[{"apiKeyAuth":[]}],"openapi":"3.0.0","paths":{"/api/v1/login":{"post":{"tags":["Auth"],"operationId":"login","summary":"Obtain an API token","description":"Validates credentials and returns the API token to use on protected routes. The username is only checked for length; password is verified against the configured hash.","responses":{"200":{"description":"Authentication successful","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"token":{"type":"string"}},"required":["message","token"],"additionalProperties":false}}}},"400":{"description":"Bad request. Make sure the request is valid","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Authorization information is missing or invalid","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["username","password"],"properties":{"username":{"type":"string","minLength":3},"password":{"type":"string","minLength":8,"format":"password"}}}}}}}},"/api/v1/logout":{"post":{"tags":["Auth"],"operationId":"logout","summary":"Log out","description":"Stateless logout for the dummy API. No token is invalidated; the client should discard its stored token.","responses":{"200":{"description":"Logout acknowledged","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}}},"security":[]}},"/api/v1/boards/today":{"get":{"tags":["Boards"],"operationId":"getSurfboardOfTheDay","summary":"Get today's surfboard lottery board","description":"Returns the featured surfboard for the current lottery draw. Requires a valid API token from login.","responses":{"200":{"description":"Surfboard of the day","content":{"application/json":{"schema":{"type":"object","properties":{"surfboardOfTheDay":{"type":"object","properties":{"lotteryId":{"type":"string"},"name":{"type":"string"},"manufacturer":{"type":"string"},"style":{"type":"string"},"finSetup":{"type":"string"},"condition":{"type":"string"},"retailValueUsd":{"type":"number"},"drawNumber":{"type":"number"},"drawAt":{"type":"string","format":"date-time"},"status":{"type":"string"},"description":{"type":"string"}},"required":["lotteryId","name","manufacturer","style","finSetup","condition","retailValueUsd","drawNumber","drawAt","status","description"],"additionalProperties":false}},"required":["surfboardOfTheDay"],"additionalProperties":false}}}},"401":{"description":"Authorization information is missing or invalid","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}},"/api/v1/forms/new-submission":{"post":{"tags":["Forms"],"operationId":"createFormSubmission","summary":"Submit a new form entry","description":"Creates a dummy form submission and returns a generated entry ID. Field validation failures return `{ errors }`; malformed JSON returns `{ error }`.","responses":{"201":{"description":"Submission created","content":{"application/json":{"schema":{"type":"object","properties":{"entryId":{"type":"string","format":"uuid"}},"required":["entryId"],"additionalProperties":false}}}},"400":{"description":"Validation failed or invalid JSON body","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"string"}},"error":{"type":"string"}},"additionalProperties":false}}}},"401":{"description":"Authorization information is missing or invalid","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["firstname","lastname","email"],"properties":{"firstname":{"type":"string"},"lastname":{"type":"string"},"email":{"type":"string","format":"email"}}}}}}}}},"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","name":"Authorization","in":"header","description":"API token from POST /api/v1/login. Use the prefix `Bearer <token>`."}}}}