enzonotario / vitepress-openapi

Generate VitePress API Docs from OpenAPI specifications
https://vitepress-openapi.vercel.app
MIT License
54 stars 9 forks source link

Display example values for Parameters #93

Closed atlemagnussen closed 1 month ago

atlemagnussen commented 1 month ago

What would you like?

Parameter example values along with the description

So for example after I overloaded your template for this section I see this:

$filter string Example name eq 'hello'

You can see the example live here as well

Why is this needed?

I see you use the example values in the playground/try it section

But I choose not to display this.

How could it be implemented?

Something like

<div v-if="props.parameter.example" class="flex flex-row space-x-2">
    <span class="text-sm example font-bold">
        Example
    </span>
    <span class="text-sm text-gray-600 dark:text-gray-300">
        {{ props.parameter.example }}
    </span>
</div>

Other information

No response

enzonotario commented 1 month ago

Hi @atlemagnussen , I added this in v0.0.3-alpha.43.

Can you please validate it? thanks for reporting!

atlemagnussen commented 1 month ago

Hi @atlemagnussen , I added this in v0.0.3-alpha.43.

Can you please validate it? thanks for reporting!

Looks very good. Thank you! Great extension overall btw :)