24
Views
3
Comments
Solved
Exposed API documentation
Question
Application Type
Reactive

Hi community, 

I have made an exposed API and opened the corresponding documentation, which is automatically generated by OutSystems. Which is partly looking like below: Now I get the question from my users, which fields are mandatory and what the possible inputs are. Most inputs are static entities (e.g. quality, period or activity) and there are thus only a limited amount of options.


While maintaining a structure as input (I do not want ~20 input parameters), is there a way to include which structure attributes are mandatory and what the different input options are? I feel like this is a straightforward question and should be available, however, I cannot find any other solutions then the one below. 

The only option I found is to include it in the given description, where "input to post a registration" now is. However, I am afraid it will get too cluttered.

I hope to have informed you enough.

Kind regards

Alex

UserImage.jpg
vikas sharma
Champion
Solution

Hi Alex,

You just need to define the mandatory param in the structure of request. Then in above screenshot when you click on 'Model', can see which param in structure is mandatory and which not. You can also set the default values in structure itself. Hope it helps.



UserImage.jpg
Alex Ruinen

Yes, perfect! Should have looked a little bit further, but this is exactly what I needed

UserImage.jpg
vikas sharma
Champion

Hi Alex,

If its fulfill your requirements then no need to explore more. But yes if we want to create more detailed documentation then we can do that as well.

regards


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.