\r\n\r\n\r\n\r\n### Why is this needed?\r\n\r\nThis is useful for endpoints that accept different request bodies\r\n\r\n### How could it be implemented?\r\n\r\nImplement and show a select element when examples are present in openapi.json:\r\n\r\n```\r\n \"requestBody\": {\r\n \"content\": {\r\n \"application/json\": {\r\n \"schema\": {\r\n \"$ref\": \"#/components/schemas/ExamplePost\"\r\n },\r\n \"examples\": {\r\n \"Example 1\": {\r\n \"summary\": \"Creating example 1\",\r\n \"value\": {\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"email\": \"test@test.com\"\r\n }\r\n },\r\n \"example 2\": {\r\n \"summary\": \"Creating example 2\",\r\n \"value\": {\r\n \"first_name\": \"John\",\r\n \"last_name\": \"Doe\",\r\n \"email\": \"test@test.com\",\r\n \"phone_number\": \"123456789\"\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"required\": true\r\n },\r\n```\r\n\r\n### Other information\r\n\r\nI couldn't find this anywhere in the documentation, but if it is already possible i would like to know how. Thank you!",[3207],{"name":3197,"color":3198},141,"Multiple request body examples","2025-01-28T13:41:14Z","https://github.com/enzonotario/vitepress-openapi/issues/141",0.79034597,{"description":3214,"labels":3215,"number":3220,"owner":3175,"repository":3176,"state":3177,"title":3221,"updated_at":3222,"url":3223,"score":3224},"### Current behavior\r\n\r\nI just added vitepress-openapi as documented + added the markdown file \r\n\r\nAnd I get many errors\r\nthe last one shown being:\r\n\r\n```\r\nBuild failed with 1 error:\r\nnode_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1225:27: ERROR: [plugin: externalize-deps] \"vitepress-openapi\" resolved to an ESM file. ESM file cannot be loaded by `require`. See https://vite.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.\r\nError: Build failed with 1 error:\r\nnode_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1225:27: ERROR: [plugin: externalize-deps] \"vitepress-openapi\" resolved to an ESM file. ESM file cannot be loaded by `require`. See https://vite.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.\r\n at failureErrorWithLog (/home/wighawag/dev/github.com/wighawag/fuzd/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1472:15)\r\n at /home/wighawag/dev/github.com/wighawag/fuzd/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:945:25\r\n at runOnEndCallbacks (/home/wighawag/dev/github.com/wighawag/fuzd/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:1315:45)\r\n at buildResponseToResult (/home/wighawag/dev/github.com/wighawag/fuzd/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:943:7)\r\n at /home/wighawag/dev/github.com/wighawag/fuzd/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:970:16\r\n at responseCallbacks.\u003Ccomputed> (/home/wighawag/dev/github.com/wighawag/fuzd/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:622:9)\r\n at handleIncomingPacket (/home/wighawag/dev/github.com/wighawag/fuzd/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:677:12)\r\n at Socket.readFromStdout (/home/wighawag/dev/github.com/wighawag/fuzd/node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild/lib/main.js:600:7)\r\n at Socket.emit (node:events:519:28)\r\n at addChunk (node:internal/streams/readable:561:12)\r\n⠦ building client + server bundles...\r\n```\r\n\r\n### Desired behavior\r\n\r\nNo error\r\n\r\n### Reproduction\r\n\r\n_No response_\r\n\r\n### Steps to reproduce\r\n\r\ngit clone https://github.com/wighawag/fuzd.git\r\ncd fuzd\r\ngit checkout feat/vitepress-openapi\r\npnpm i\r\npnpm docs:build\r\n\r\n### Logs and Error Messages\r\n\r\n_No response_\r\n\r\n### Other Information\r\n\r\n_No response_",[3216,3217],{"name":3172,"color":3173},{"name":3218,"color":3219},"question","d876e3",105,"Errors when building docs","2024-11-02T06:51:12Z","https://github.com/enzonotario/vitepress-openapi/issues/105",0.7906001,{"description":3226,"labels":3227,"number":3229,"owner":3175,"repository":3176,"state":3177,"title":3230,"updated_at":3231,"url":3232,"score":3233},"### What would you like?\r\n\r\nParameter example values along with the description\r\n\r\nSo for example after I overloaded your template for this section I see this:\r\n\r\n**$filter** string\r\nExample name eq 'hello'\r\n\r\n\r\nYou can see the example [live here](https://apidev.digilean.tools/docs/operations/Boards_List) as well\r\n\r\n### Why is this needed?\r\n\r\nI see you use the example values in the playground/try it section\r\n\r\nBut I choose not to display this.\r\n\r\n### How could it be implemented?\r\n\r\nSomething like \r\n```vue\r\n\u003Cdiv v-if=\"props.parameter.example\" class=\"flex flex-row space-x-2\">\r\n \u003Cspan class=\"text-sm example font-bold\">\r\n Example\r\n \u003C/span>\r\n \u003Cspan class=\"text-sm text-gray-600 dark:text-gray-300\">\r\n {{ props.parameter.example }}\r\n \u003C/span>\r\n\u003C/div>\r\n```\r\n\r\n### Other information\r\n\r\n_No response_",[3228],{"name":3197,"color":3198},93,"Display example values for Parameters","2024-10-17T08:22:46Z","https://github.com/enzonotario/vitepress-openapi/issues/93",0.8007173,{"description":3235,"labels":3236,"number":3238,"owner":3175,"repository":3176,"state":3177,"title":3239,"updated_at":3240,"url":3241,"score":3242},"### What would you like?\n\nThe current version generates \"static\" code for each language, based only on the url and method. Unfortunately, the url is simply: `const url = props.baseUrl + props.path`. This has the issue that any path parameters are left as-is in the code.\r\n\r\nIt would be great if the sample code could be updated to include the variables in the \"try it\" box. This way the code sample would be \"complete\". I _think_ this would be done in much the same was as the `OACodeBlock` currently computes the URL for curl\n\n### Why is this needed?\n\nIf you copy-and-paste the code sample as-is, you will end up with an invalid URL if there are path parameters.\r\n\r\nAlso, it would be nice to mix-and-match such that you can _remove_ the try it portion of the playground, but keep the sample code. This way people can \"build\" a request in their language of choice based on the variables form.\n\n### How could it be implemented?\n\nI _think_ you would need to extract (or just duplicate?) the code used to compute the curl information:\r\n\r\n```\r\nconst curl = computed(() => {\r\n const headers = request.value.headers\r\n if (!headers?.['Content-Type']) {\r\n headers['Content-Type'] = 'application/json'\r\n }\r\n\r\n return fetchToCurl({\r\n method: props.method.toUpperCase(),\r\n url: request.value.url,\r\n headers,\r\n body: request.value.body ? formatJson(request.value.body) : null,\r\n })\r\n})\r\n```\r\n\r\nThen pass this as a parameter to `generateCodeSamples` so that it can generate each code sample appropriately.\n\n### Other information\n\nIt would also be _awesome_ to select _which_ languages you want to support, and possibly even some way to provide the template for each language. I realize this is above-and-beyond, but something to think about if you're changing this.",[3237],{"name":3197,"color":3198},92,"Modify Sample Code Based on Variables","2024-11-15T02:40:07Z","https://github.com/enzonotario/vitepress-openapi/issues/92",0.8049033,{"description":3244,"labels":3245,"number":3247,"owner":3175,"repository":3248,"state":3177,"title":3249,"updated_at":3250,"url":3251,"score":3252},"# Agregar Aplicación a la lista de aplicaciones que consumen DolarApi.com\n\n## Información de la Aplicación\n\n- **Nombre de la Aplicación:**\n Dólar Ahora\n\n- **URL de la Aplicación:**\n https://play.google.com/store/apps/details?id=com.fraancogaalfras.dolarahora\n\n- **Descripción de la Aplicación:**\n App móvil para consultar el precio de los dólares financieros en Argentina.\n",[3246],{"name":3186,"color":3187},39,"esjs-dolar-api","Listar Aplicación - Dólar Ahora","2025-03-01T20:46:40Z","https://github.com/enzonotario/esjs-dolar-api/issues/39",0.8053724,{"description":3254,"labels":3255,"number":352,"owner":3175,"repository":3176,"state":3177,"title":3256,"updated_at":3257,"url":3258,"score":3259},"### Current behavior\n\nWhen showing operations by path, the full path name is not shown for sub-paths of the operation. This can slightly be worked around by flattening to a depth of 2, but this does not work if there are no other paths after.\n\nFor example, if you have the paths /artists and /artists/{id} it will just show /artists and then /{id} as the sub-path below it.\n\nYou can see this in the stackblitz example here: [stackblitz example](https://stackblitz.com/edit/enzonotario-vitepress-openapi-starter-cqsbxmar?file=public%2Fopenapi.json) (forked from an example you provided another user)\n\nIf you look, you'll notice that the globalv2/attachments/{id} has the issue even when flattening. You can see the same behavior for /artists in the example if you remove the /user/signup endpoint from openapi.json. For some reason, the existence of another endpoint after the /{id} does allow it to show the full path for those /{id} endpoints.\n\n\n\n\n\n### Desired behavior\n\nThe desired behavior would be to have the full path shown for sub-paths and not just show /{id}, even when there are no other sub-paths to the group of items.\n\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/enzonotario-vitepress-openapi-starter-cqsbxmar?file=public%2Fopenapi.json\n\n### Steps to reproduce\n\nOpen the sidebar and view the paths documented. Without flattening, the sub-path will always just show /{id}. If you flatten to a depth of 2, it will resolve the issue unless there are no other endpoints after the /{id} sub-path.\n\n### Logs and Error Messages\n\n_No response_\n\n### Other Information\n\n_No response_",[],"Issue showing full path name when showing operations by path","2025-01-29T14:29:13Z","https://github.com/enzonotario/vitepress-openapi/issues/163",0.8069737,{"description":3261,"labels":3262,"number":1612,"owner":3175,"repository":3248,"state":3177,"title":3264,"updated_at":3265,"url":3266,"score":3267},"",[3263],{"name":3186,"color":3187},"Add Dollar Blue for Bolivia","2025-02-17T22:04:29Z","https://github.com/enzonotario/esjs-dolar-api/issues/37",0.8084518,["Reactive",3269],{},["Set"],["ShallowReactive",3272],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fosimqqtnnMLURZ2_9PRYvJDxJdXMYSTp5ZU3FVA6Osw":-1},"/enzonotario/vitepress-openapi/71"]