\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!",[3054],{"name":3044,"color":3045},141,"Multiple request body examples","2025-01-28T13:41:14Z","https://github.com/enzonotario/vitepress-openapi/issues/141",0.79034597,{"description":3061,"labels":3062,"number":3067,"owner":3022,"repository":3023,"state":3024,"title":3068,"updated_at":3069,"url":3070,"score":3071},"### 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_",[3063,3064],{"name":3020,"color":3021},{"name":3065,"color":3066},"question","d876e3",105,"Errors when building docs","2024-11-02T06:51:12Z","https://github.com/enzonotario/vitepress-openapi/issues/105",0.7906001,{"description":3073,"labels":3074,"number":3076,"owner":3022,"repository":3023,"state":3024,"title":3077,"updated_at":3078,"url":3079,"score":3080},"### 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_",[3075],{"name":3044,"color":3045},93,"Display example values for Parameters","2024-10-17T08:22:46Z","https://github.com/enzonotario/vitepress-openapi/issues/93",0.80071723,{"description":3082,"labels":3083,"number":3085,"owner":3022,"repository":3023,"state":3024,"title":3086,"updated_at":3087,"url":3088,"score":3089},"### 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.",[3084],{"name":3044,"color":3045},92,"Modify Sample Code Based on Variables","2024-11-15T02:40:07Z","https://github.com/enzonotario/vitepress-openapi/issues/92",0.8049033,{"description":3091,"labels":3092,"number":3094,"owner":3022,"repository":3095,"state":3024,"title":3096,"updated_at":3097,"url":3098,"score":3099},"# 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",[3093],{"name":3033,"color":3034},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":3101,"labels":3102,"number":352,"owner":3022,"repository":3023,"state":3024,"title":3103,"updated_at":3104,"url":3105,"score":3106},"### 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":3108,"labels":3109,"number":1597,"owner":3022,"repository":3095,"state":3024,"title":3111,"updated_at":3112,"url":3113,"score":3114},"",[3110],{"name":3033,"color":3034},"Add Dollar Blue for Bolivia","2025-02-17T22:04:29Z","https://github.com/enzonotario/esjs-dolar-api/issues/37",0.8084518,["Reactive",3116],{},["Set"],["ShallowReactive",3119],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fosimqqtnnMLURZ2_9PRYvJDxJdXMYSTp5ZU3FVA6Osw":-1},"/enzonotario/vitepress-openapi/71"]