@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Random Riddles API
@base https://api.fungenerators.com
@version 1.5
@auth ApiKey X-Fungenerators-Api-Secret in header
@endpoints 6
@toc riddle(6)

@endpoint GET /riddle
@optional {id: str(string)}
@returns(200)
@errors {401}

@endpoint POST /riddle
@required {question: str(string), category: str(string), answer: str(string)}
@returns(200)
@errors {401}

@endpoint PUT /riddle
@required {question: str(string), category: str(string), answer: str(string)}
@returns(200)
@errors {401}

@endpoint DELETE /riddle
@required {id: str(string)}
@returns(200)
@errors {401}

@endpoint GET /riddle/random
@optional {category: str(string)}
@returns(200)
@errors {401}

@endpoint GET /riddle/search
@optional {query: str(string), category: str(string)}
@returns(200)
@errors {401}

@end
