KostasR 1 Posted Tuesday at 08:41 PM Is there documentation on how to use Swagger with the MARS REST API? For example, how can describe the body params in a POST method, such as string length, date format, required, etc. Share this post Link to post
Lars Fosdal 1853 Posted Wednesday at 02:25 PM Not sure if I understand your question? Swagger is API documentation. Are you looking for how to generate code for MARS REST based on a Swagger definition? Share this post Link to post
KostasR 1 Posted Wednesday at 07:44 PM (edited) I've looked at Demo OpenAPI. MARS builds a Swagger website with my resources. I have a POST method with a body param, containing the record. My question is now, how can I describe the fields of the record for swagger, i. e. the length of a string or the date format or if the field is required? Maybe with attributes? Is there any documentation? Edited Wednesday at 07:45 PM by KostasR Share this post Link to post
Lars Fosdal 1853 Posted 3 hours ago Ah, so how to generate complete Swagger info from your MARS API? Share this post Link to post
Lars Fosdal 1853 Posted 2 hours ago I see there are several attributes relevant for the Swagger data, such as RequestParamAttribute, but I see very few examples of use. Github: search for "Param]" (without the quotes) I woud suggest you experiment with those to see what your get. Share this post Link to post