Just want to understand your question more clear
When we are trying to create rest API , swagger will generate the example and model values as shown below
In the example section, For each attribute, it shows some sample values.
Is that you referring to or something else? If you could elaborate your question , It would be helpful to answer
To show examples in the swagger.json you should set the documentation of the operation:
Do note the three backticks before and after the json. ```
In the web-browser in <yourapplication>/rest-doc/ it will show up like this: