\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!",[3205],{"name":3206,"color":3207},"enhancement","a2eeef",141,"Multiple request body examples","2025-01-28T13:41:14Z","https://github.com/enzonotario/vitepress-openapi/issues/141",0.8177268,{"description":3214,"labels":3215,"number":3216,"owner":3172,"repository":3173,"state":3186,"title":3217,"updated_at":3218,"url":3219,"score":3220},"Hi! I was working on my current project, where I have a schema that produces this UI:\n\nhttps://github.com/user-attachments/assets/21f90ff1-fb58-4aff-86e5-249e453c829f\n\nThis little screencast aims to show that it's a bit non-obvious - especially for people who are just starting to explore the site with the spec and don't know how the UI works - that object properties are there. Long description with some markdown/emojis makes it seem like the description is all that exists under this property.\n\nIn contrast, when there's no description, it's pretty obvious that the properties are expandable:\n\n\u003Cimg width=\"390\" height=\"113\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/5b945a5a-e471-44b3-8f18-0e0219c8caa0\" />\n\nBut in the case of a rich description - which is visible by default and draws attention away from the relatively small \"expand\" button icon on the top - a user who reads the description might reasonably assume that it's the only content. They may not think, \"Hmm, I read the description, but there must be properties - let me look for some element that will let me show them!\"\n\n## Suggestions:\n\n### Option 1:\n\nHide descriptions for objects when in Collapsed state, show only when Expanded:\n\nhttps://github.com/user-attachments/assets/40ead49f-6023-4cbb-9a7b-8e5a5c96b952\n\n### Option 2:\n\nShow a small hint after the description, like a verbose \"Expand\" text button or a similar UI element (only shown when it's an array/object and has a description):\n\nhttps://github.com/user-attachments/assets/c8a31a05-6b54-400d-84a9-b126b9762b1e\n\n---\n\nLet me know what you think, @enzonotario! Do you like any of the proposed options, or do you have some other idea of how to address this?",[],271,"[Discussion] When an object has a description, it's not obvious that its properties are expandable","2025-07-21T01:18:22Z","https://github.com/enzonotario/vitepress-openapi/issues/271",0.8215296,{"description":3222,"labels":3223,"number":1677,"owner":3172,"repository":3185,"state":3186,"title":3224,"updated_at":3225,"url":3226,"score":3227},"https://www.bcra.gob.ar/Catalogo/apis.asp?fileName=central-deudores-v1§ionName=Central%20de%20Deudores",[],"Sumar datos de las APIs de deudores del BCRA","2025-02-19T00:26:37Z","https://github.com/enzonotario/esjs-argentina-datos-api/issues/11",0.8259565,{"description":3229,"labels":3230,"number":3235,"owner":3172,"repository":3173,"state":3186,"title":3236,"updated_at":3237,"url":3238,"score":3239},"Example\r\n\r\n\r\n\r\n200,400,401,429,500\r\n\r\nPerhaps it could / should be a drop down if there are more than 4?",[3231,3234],{"name":3232,"color":3233},"bug","d73a4a",{"name":3206,"color":3207},46,"Too many response codes results in element overlap","2024-09-20T01:51:07Z","https://github.com/enzonotario/vitepress-openapi/issues/46",0.83145094,{"description":3241,"labels":3242,"number":3244,"owner":3172,"repository":3173,"state":3186,"title":3245,"updated_at":3246,"url":3247,"score":3248},"### 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.",[3243],{"name":3206,"color":3207},92,"Modify Sample Code Based on Variables","2024-11-15T02:40:07Z","https://github.com/enzonotario/vitepress-openapi/issues/92",0.8393276,{"description":3250,"labels":3251,"number":3252,"owner":3172,"repository":3197,"state":3186,"title":3253,"updated_at":3254,"url":3255,"score":3256},"# Agregar Aplicación a la lista de aplicaciones que consumen DolarApi.com\r\n\r\n## Información de la Aplicación\r\n\r\n- **Nombre de la Aplicación:**\r\nDolar Info\r\n\r\n- **URL de la Aplicación:**\r\nwww.dolar-info.com\r\n\r\n- **Descripción de la Aplicación:**\r\nAplicación web enfocada en ofrecer información actualizada para analizar indicadores económicos claves de Argentina\r\n",[],25,"Listar Aplicación","2024-07-04T22:22:59Z","https://github.com/enzonotario/esjs-dolar-api/issues/25",0.84507805,{"description":3258,"labels":3259,"number":3260,"owner":3172,"repository":3173,"state":3186,"title":3261,"updated_at":3262,"url":3263,"score":3264},"I believe spec such as this is valid and OK.\n\nBasically having a schema object, that has a property of type string, and then using oneOf to be abe to define extra information about the strings.\n\n```\n \"notificationTrigger\": {\n \"properties\": {\n \"name\": {\n \"type\": \"string\"\n },\n \"type\": {\n \"type\": \"string\",\n \"oneOf\": [\n { \"const\": \"lowBat\", \"title\": \"Low Battery\", \"description\": \"Triggered when battery level is low.\" },\n { \"const\": \"button\", \"title\": \"Button Press\", \"description\": \"Triggered on a button press.\" },\n \n```\n\nI believe a relevant link from the spec would be https://spec.openapis.org/oas/v3.1.1.html#model-with-annotated-enumeration\n\nHowever the components currently render this incorrectly.\n\n\u003Cimg width=\"670\" height=\"396\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/267cff6d-9c0a-4bd7-8a8e-734588fb775b\" />",[],288,"Support rendering model-with-annotated-enumeration in Request Body schema","2025-08-11T22:29:43Z","https://github.com/enzonotario/vitepress-openapi/issues/288",0.84643126,["Reactive",3266],{},["Set"],["ShallowReactive",3269],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f0tGf9ulP5kzQ2ohFg474cuFL282REpgjW4ux7R7o2iM":-1},"/enzonotario/esjs-dolar-api/14"]