swagger2markup icon indicating copy to clipboard operation
swagger2markup copied to clipboard

Vendor extension for example parameter value

Open kidnme opened this issue 8 years ago • 1 comments

I noticed that when generating an example request, path parameters are filled with a selected value based on their type. So, for an integer, its 0, for strings, its 'string', and so forth. Seems like it would be useful to have a vendor extension, say x-sw2mk-example, that allowed you to specify the example parameter value that would be displayed. It'd be relatively trivial to add (simply look for the vendor extension and use that object instead of the value based on type).

That being said, I do realize that this would be solved if swagger2markup ever fully supports OAS 3. And, by adding a 'supported' vendor extension, you could easily open yourself up to a flood of 'extensions' in the future.

kidnme avatar Jan 11 '18 21:01 kidnme

I did discover that swagger2markup supports x-example in parameter definitions. So, this issue should be closed. Perhaps, documenting support of this (and any other x- properties would be useful though).

kidnme avatar Mar 29 '18 14:03 kidnme