docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
[FR] Use query param examples in demo/code example
Is your feature request related to a problem?
Not sure if this is a bug or a feature request. I would like to show examples of query parameters in the code sample snippets, but adding them as examples to my parameters does not cause them to be included either there or in the demo sidebar.
Describe the solution you'd like
Adding an example to a query param should make it be included in the demo box and the code snippets, similar to the way that examples are added to request bodies.
Describe alternatives you've considered
N/A
Hi @IanVS, this is a known limitation. Currently, the behavior is that requestBodies are "pre-loaded" into code snippets but parameters require user input to appear. You're welcome to open a FR for this as I can see how it makes sense to pre-load parameter values. I suppose the initial params should be based on defaults/examples and fall back to data type.
You're welcome to open a FR for this
Sorry, but isn't that what this is? Do you mean open a PR for it?
Yup, disregard. There's so many issues that I confused this with another one. 😅
Haha I know how that goes. Sorry I've been opening so many issues / discussions. I've been really liking the tool overall though. I even just tweeted about it! https://twitter.com/IanVanSchooten/status/1626668097984765953
Are there any updates regarding this issue?
related to #544