Payload examples for OAS #2047
-
Just wanting to know if there is an easy way to generate payload examples for OAS 3 specs. I was hoping there was an easy Any suggestions of where to start? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I also didn't find any easy way to do this. Maybe write an Issue for this? I have a suggestion for a very wonky workaround. Your example would be defined like this:
Here is a playground-link Type-Checked examples would be a very cool feature for TypeSpec IMHO. |
Beta Was this translation helpful? Give feedback.
I also didn't find any easy way to do this. Maybe write an Issue for this?
I have a suggestion for a very wonky workaround.
You could use an extension of OAS and then remove the "x" in a script.
Your example would be defined like this:
Here is a playground-link
And then you would need to write a script that removes the "x-"
Obviously this isn't type-checked or anything as you can define anything you'd like to be an extension.
Type-Checked examples would be a very cool feature for TypeSpec IMHO.
If you're too busy to write the issue, let me know…