From 336f7d61cdd9191636b32ad668796604031b7c84 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Fri, 16 Sep 2022 10:27:47 -0400 Subject: [PATCH] [Enhancement] Re-introduce ability to send API requests from browser (#264) * Use ClodeBlock to render response * Add execute/send feature back * Experiment with SEND feature * Add oauth2 support * Add authorization component back to demo panel * Add xml highlighting support * Make label optional * Ensure unique keys in Authorization and SecuritySchemes * Change execute button styles * Wrap response in details and replace floating button * Reorder demo panel * Update demo panel styles * Wrap security schemes in details * Cleanup unused imports/code * Remove IOT API * Re-gen API docs * Cleanup iot docs * Create Request component and collapse when send button is clicked * Include server description when available * Re-gen API docs * Add summary class to security schemes * Re-gen API docs * Artificial delay * Conditional render send button * Add required label support to demo panel * Fix nested li * Rename class to className * Hard set sessionStorage * Re-gen API docs * Hard set sessionStorage * Add timeout * Add terms of use modal support as placeholder * Replace non-escaped double quotes with single * Add quotes around tag description --- demo/docs/petstore/add-pet.api.mdx | 2 +- demo/docs/petstore/create-user.api.mdx | 6 +- .../create-users-with-array-input.api.mdx | 6 +- .../create-users-with-list-input.api.mdx | 6 +- demo/docs/petstore/delete-order.api.mdx | 2 +- demo/docs/petstore/delete-pet.api.mdx | 2 +- demo/docs/petstore/delete-user.api.mdx | 2 +- .../docs/petstore/find-pets-by-status.api.mdx | 2 +- demo/docs/petstore/find-pets-by-tags.api.mdx | 2 +- demo/docs/petstore/get-inventory.api.mdx | 2 +- demo/docs/petstore/get-order-by-id.api.mdx | 4 +- demo/docs/petstore/get-pet-by-id.api.mdx | 2 +- demo/docs/petstore/get-user-by-name.api.mdx | 8 +- demo/docs/petstore/login-user.api.mdx | 6 +- demo/docs/petstore/logout-user.api.mdx | 2 +- demo/docs/petstore/place-order.api.mdx | 4 +- .../subscribe-to-the-store-events.api.mdx | 2 +- .../petstore/update-pet-with-form.api.mdx | 2 +- demo/docs/petstore/update-pet.api.mdx | 2 +- demo/docs/petstore/update-user.api.mdx | 6 +- demo/docs/petstore/upload-file.api.mdx | 2 +- .../1.0.0/create-user.api.mdx | 4 +- .../create-users-with-array-input.api.mdx | 4 +- .../create-users-with-list-input.api.mdx | 4 +- .../1.0.0/get-order-by-id.api.mdx | 2 +- .../1.0.0/get-user-by-name.api.mdx | 6 +- .../1.0.0/login-user.api.mdx | 4 +- .../1.0.0/place-order.api.mdx | 4 +- .../1.0.0/update-user.api.mdx | 4 +- demo/docs/petstore_versioned/add-pet.api.mdx | 2 +- .../petstore_versioned/create-user.api.mdx | 6 +- .../create-users-with-array-input.api.mdx | 6 +- .../create-users-with-list-input.api.mdx | 6 +- .../petstore_versioned/delete-order.api.mdx | 2 +- .../petstore_versioned/delete-pet.api.mdx | 2 +- .../petstore_versioned/delete-user.api.mdx | 2 +- .../find-pets-by-status.api.mdx | 2 +- .../find-pets-by-tags.api.mdx | 2 +- .../petstore_versioned/get-inventory.api.mdx | 2 +- .../get-order-by-id.api.mdx | 4 +- .../petstore_versioned/get-pet-by-id.api.mdx | 2 +- .../get-user-by-name.api.mdx | 8 +- .../petstore_versioned/login-user.api.mdx | 6 +- .../petstore_versioned/logout-user.api.mdx | 2 +- .../petstore_versioned/place-order.api.mdx | 4 +- .../subscribe-to-the-store-events.api.mdx | 2 +- .../update-pet-with-form.api.mdx | 2 +- .../petstore_versioned/update-pet.api.mdx | 2 +- .../petstore_versioned/update-user.api.mdx | 6 +- .../petstore_versioned/upload-file.api.mdx | 2 +- demo/examples/petstore.yaml | 6 +- .../src/index.ts | 2 +- .../src/markdown/createRequestSchema.ts | 2 +- .../src/markdown/createResponseSchema.ts | 2 +- .../src/markdown/createStatusCodes.ts | 2 +- .../src/openapi/openapi.ts | 14 +- .../package.json | 1 + .../ApiDemoPanel/Authorization/auth-types.ts | 4 + .../ApiDemoPanel/Authorization/index.tsx | 154 ++++++++++++++ .../theme/ApiDemoPanel/Authorization/slice.ts | 2 +- .../src/theme/ApiDemoPanel/Body/index.tsx | 34 ++- .../src/theme/ApiDemoPanel/Execute/index.tsx | 188 +++++++++++++++++ .../theme/ApiDemoPanel/Execute/makeRequest.ts | 197 ++++++++++++++++++ .../src/theme/ApiDemoPanel/FormItem/index.tsx | 13 +- .../ApiDemoPanel/FormItem/styles.module.css | 5 + .../theme/ApiDemoPanel/ParamOptions/index.tsx | 2 +- .../src/theme/ApiDemoPanel/Request/index.tsx | 71 +++++++ .../ApiDemoPanel/Request/styles.module.css | 17 ++ .../src/theme/ApiDemoPanel/Response/index.tsx | 32 +-- .../ApiDemoPanel/SecuritySchemes/index.tsx | 39 ++-- .../src/theme/ApiDemoPanel/Server/index.tsx | 1 + .../theme/ApiDemoPanel/buildPostmanRequest.ts | 25 ++- .../src/theme/ApiDemoPanel/index.tsx | 17 +- .../ApiDemoPanel/persistanceMiddleware.ts | 2 +- .../src/theme/ApiDemoPanel/react-modal.d.ts | 8 + .../theme/ApiItem/Layout/styles.module.css | 56 +++++ yarn.lock | 24 ++- 77 files changed, 941 insertions(+), 155 deletions(-) create mode 100644 packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/index.tsx create mode 100644 packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Execute/index.tsx create mode 100644 packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Execute/makeRequest.ts create mode 100644 packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Request/index.tsx create mode 100644 packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Request/styles.module.css create mode 100644 packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/react-modal.d.ts diff --git a/demo/docs/petstore/add-pet.api.mdx b/demo/docs/petstore/add-pet.api.mdx index 9b2109b3c..edafaf0f6 100644 --- a/demo/docs/petstore/add-pet.api.mdx +++ b/demo/docs/petstore/add-pet.api.mdx @@ -4,7 +4,7 @@ description: "Add new pet to the store inventory." sidebar_label: Add a new pet to the store hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"Add new pet to the store inventory.","operationId":"addPet","responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"C#","source":"PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey(\"your api key\");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = \"Rex\";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n"},{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}]}},"application/xml":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"hooray"}}}}},"description":"Pet object that needs to be added to the store","required":true},"method":"post","path":"/pet","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Add a new pet to the store","description":{"content":"Add new pet to the store inventory.","type":"text/plain"},"url":{"path":["pet"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"disabled":false,"description":{"content":"The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US","type":"text/plain"},"key":"Accept-Language","value":""},{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"Add new pet to the store inventory.","operationId":"addPet","responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"C#","source":"PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey(\"your api key\");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = \"Rex\";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n"},{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}]}},"application/xml":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"hooray"}}}}},"description":"Pet object that needs to be added to the store","required":true},"method":"post","path":"/pet","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Add a new pet to the store","description":{"content":"Add new pet to the store inventory.","type":"text/plain"},"url":{"path":["pet"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"disabled":false,"description":{"content":"The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US","type":"text/plain"},"key":"Accept-Language","value":""},{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "post api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Add a new pet to the store' (add-pet)" diff --git a/demo/docs/petstore/create-user.api.mdx b/demo/docs/petstore/create-user.api.mdx index 7dde7b22e..89769deed 100644 --- a/demo/docs/petstore/create-user.api.mdx +++ b/demo/docs/petstore/create-user.api.mdx @@ -4,7 +4,7 @@ description: "This can only be done by the logged in user." sidebar_label: Create user hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"This can only be done by the logged in user.","operationId":"createUser","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}},"description":"Created user object","required":true},"method":"post","path":"/user","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Create user","description":{"content":"This can only be done by the logged in user.","type":"text/plain"},"url":{"path":["user"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["user"],"description":"This can only be done by the logged in user.","operationId":"createUser","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}},"description":"Created user object","required":true},"method":"post","path":"/user","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Create user","description":{"content":"This can only be done by the logged in user.","type":"text/plain"},"url":{"path":["user"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Create user' (create-user)" @@ -29,7 +29,7 @@ This can only be done by the logged in user. Created user object -
successful operation diff --git a/demo/docs/petstore/create-users-with-array-input.api.mdx b/demo/docs/petstore/create-users-with-array-input.api.mdx index 49d796244..73175a6a7 100644 --- a/demo/docs/petstore/create-users-with-array-input.api.mdx +++ b/demo/docs/petstore/create-users-with-array-input.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Creates list of users with given input array hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"","operationId":"createUsersWithArrayInput","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"description":"List of user object","required":true},"method":"post","path":"/user/createWithArray","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":[{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0}],"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Creates list of users with given input array","description":{"content":"","type":"text/plain"},"url":{"path":["user","createWithArray"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["user"],"description":"","operationId":"createUsersWithArrayInput","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"description":"List of user object","required":true},"method":"post","path":"/user/createWithArray","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":[{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0}],"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Creates list of users with given input array","description":{"content":"","type":"text/plain"},"url":{"path":["user","createWithArray"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Creates list of users with given input array' (create-users-with-array-input)" @@ -25,7 +25,7 @@ import TabItem from "@theme/TabItem"; List of user object -
successful operation diff --git a/demo/docs/petstore/create-users-with-list-input.api.mdx b/demo/docs/petstore/create-users-with-list-input.api.mdx index e1f44debb..925e7c0f7 100644 --- a/demo/docs/petstore/create-users-with-list-input.api.mdx +++ b/demo/docs/petstore/create-users-with-list-input.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Creates list of users with given input list hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"","operationId":"createUsersWithListInput","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"description":"List of user object","required":true},"method":"post","path":"/user/createWithList","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":[{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0}],"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Creates list of users with given input list","description":{"content":"","type":"text/plain"},"url":{"path":["user","createWithList"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["user"],"description":"","operationId":"createUsersWithListInput","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"description":"List of user object","required":true},"method":"post","path":"/user/createWithList","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":[{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0}],"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Creates list of users with given input list","description":{"content":"","type":"text/plain"},"url":{"path":["user","createWithList"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Creates list of users with given input list' (create-users-with-list-input)" @@ -25,7 +25,7 @@ import TabItem from "@theme/TabItem"; List of user object -
successful operation diff --git a/demo/docs/petstore/delete-order.api.mdx b/demo/docs/petstore/delete-order.api.mdx index cf549abc7..810bf02f8 100644 --- a/demo/docs/petstore/delete-order.api.mdx +++ b/demo/docs/petstore/delete-order.api.mdx @@ -4,7 +4,7 @@ description: "For valid response try integer IDs with value < 1000. Anything abo sidebar_label: Delete purchase order by ID hide_title: true hide_table_of_contents: true -api: {"tags":["store"],"description":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors","operationId":"deleteOrder","parameters":[{"name":"orderId","in":"path","description":"ID of the order that needs to be deleted","required":true,"schema":{"type":"string","minimum":1}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}},"method":"delete","path":"/store/order/{orderId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Delete purchase order by ID","description":{"content":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors","type":"text/plain"},"url":{"path":["store","order",":orderId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the order that needs to be deleted","type":"text/plain"},"type":"any","value":"","key":"orderId"}]},"method":"DELETE"}} +api: {"tags":["store"],"description":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors","operationId":"deleteOrder","parameters":[{"name":"orderId","in":"path","description":"ID of the order that needs to be deleted","required":true,"schema":{"type":"string","minimum":1}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}},"method":"delete","path":"/store/order/{orderId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Delete purchase order by ID","description":{"content":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors","type":"text/plain"},"url":{"path":["store","order",":orderId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the order that needs to be deleted","type":"text/plain"},"type":"any","value":"","key":"orderId"}]},"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Delete purchase order by ID' (delete-order)" diff --git a/demo/docs/petstore/delete-pet.api.mdx b/demo/docs/petstore/delete-pet.api.mdx index b3565de4c..81a657950 100644 --- a/demo/docs/petstore/delete-pet.api.mdx +++ b/demo/docs/petstore/delete-pet.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Deletes a pet hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"","operationId":"deletePet","parameters":[{"name":"api_key","in":"header","required":false,"schema":{"type":"string"},"example":"Bearer "},{"name":"petId","in":"path","description":"Pet id to delete","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Invalid pet value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"delete","path":"/pet/{petId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Deletes a pet","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) Pet id to delete","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"disabled":false,"description":{"content":"","type":"text/plain"},"key":"api_key","value":""}],"method":"DELETE","auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"","operationId":"deletePet","parameters":[{"name":"api_key","in":"header","required":false,"schema":{"type":"string"},"example":"Bearer "},{"name":"petId","in":"path","description":"Pet id to delete","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Invalid pet value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"delete","path":"/pet/{petId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Deletes a pet","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) Pet id to delete","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"disabled":false,"description":{"content":"","type":"text/plain"},"key":"api_key","value":""}],"method":"DELETE","auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "delete api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Deletes a pet' (delete-pet)" diff --git a/demo/docs/petstore/delete-user.api.mdx b/demo/docs/petstore/delete-user.api.mdx index f0b450c35..0c9a8c987 100644 --- a/demo/docs/petstore/delete-user.api.mdx +++ b/demo/docs/petstore/delete-user.api.mdx @@ -4,7 +4,7 @@ description: "This can only be done by the logged in user." sidebar_label: Delete user hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"This can only be done by the logged in user.","operationId":"deleteUser","parameters":[{"name":"username","in":"path","description":"The name that needs to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}},"method":"delete","path":"/user/{username}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Delete user","description":{"content":"This can only be done by the logged in user.","type":"text/plain"},"url":{"path":["user",":username"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name that needs to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"method":"DELETE"}} +api: {"tags":["user"],"description":"This can only be done by the logged in user.","operationId":"deleteUser","parameters":[{"name":"username","in":"path","description":"The name that needs to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}},"method":"delete","path":"/user/{username}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Delete user","description":{"content":"This can only be done by the logged in user.","type":"text/plain"},"url":{"path":["user",":username"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name that needs to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Delete user' (delete-user)" diff --git a/demo/docs/petstore/find-pets-by-status.api.mdx b/demo/docs/petstore/find-pets-by-status.api.mdx index d7b93b592..e185a2965 100644 --- a/demo/docs/petstore/find-pets-by-status.api.mdx +++ b/demo/docs/petstore/find-pets-by-status.api.mdx @@ -4,7 +4,7 @@ description: "Multiple status values can be provided with comma separated string sidebar_label: Finds Pets by status hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"Multiple status values can be provided with comma separated strings","operationId":"findPetsByStatus","parameters":[{"name":"status","in":"query","description":"Status values that need to be considered for filter","required":true,"style":"form","schema":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"string","enum":["available","pending","sold"],"default":"available"}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Finds Pets by status","description":{"content":"Multiple status values can be provided with comma separated strings","type":"text/plain"},"url":{"path":["pet","findByStatus"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Status values that need to be considered for filter","type":"text/plain"},"key":"status","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"Multiple status values can be provided with comma separated strings","operationId":"findPetsByStatus","parameters":[{"name":"status","in":"query","description":"Status values that need to be considered for filter","required":true,"style":"form","schema":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"string","enum":["available","pending","sold"],"default":"available"}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Finds Pets by status","description":{"content":"Multiple status values can be provided with comma separated strings","type":"text/plain"},"url":{"path":["pet","findByStatus"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Status values that need to be considered for filter","type":"text/plain"},"key":"status","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "get api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Finds Pets by status' (find-pets-by-status)" diff --git a/demo/docs/petstore/find-pets-by-tags.api.mdx b/demo/docs/petstore/find-pets-by-tags.api.mdx index 627b0884e..f4b345ea9 100644 --- a/demo/docs/petstore/find-pets-by-tags.api.mdx +++ b/demo/docs/petstore/find-pets-by-tags.api.mdx @@ -4,7 +4,7 @@ description: "Multiple tags can be provided with comma separated strings. Use ta sidebar_label: Finds Pets by tags hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","operationId":"findPetsByTags","deprecated":true,"parameters":[{"name":"tags","in":"query","description":"Tags to filter by","required":true,"style":"form","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Finds Pets by tags","description":{"content":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","type":"text/plain"},"url":{"path":["pet","findByTags"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Tags to filter by","type":"text/plain"},"key":"tags","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","operationId":"findPetsByTags","deprecated":true,"parameters":[{"name":"tags","in":"query","description":"Tags to filter by","required":true,"style":"form","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Finds Pets by tags","description":{"content":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","type":"text/plain"},"url":{"path":["pet","findByTags"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Tags to filter by","type":"text/plain"},"key":"tags","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "get api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Finds Pets by tags' (find-pets-by-tags)" diff --git a/demo/docs/petstore/get-inventory.api.mdx b/demo/docs/petstore/get-inventory.api.mdx index 8a06fa839..7a5079a2f 100644 --- a/demo/docs/petstore/get-inventory.api.mdx +++ b/demo/docs/petstore/get-inventory.api.mdx @@ -4,7 +4,7 @@ description: "Returns a map of status codes to quantities" sidebar_label: Returns pet inventories by status hide_title: true hide_table_of_contents: true -api: {"tags":["store"],"description":"Returns a map of status codes to quantities","operationId":"getInventory","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"api_key":[]}],"method":"get","path":"/store/inventory","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Returns pet inventories by status","description":{"content":"Returns a map of status codes to quantities","type":"text/plain"},"url":{"path":["store","inventory"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} +api: {"tags":["store"],"description":"Returns a map of status codes to quantities","operationId":"getInventory","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"api_key":[]}],"method":"get","path":"/store/inventory","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Returns pet inventories by status","description":{"content":"Returns a map of status codes to quantities","type":"text/plain"},"url":{"path":["store","inventory"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "get api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Returns pet inventories by status' (get-inventory)" diff --git a/demo/docs/petstore/get-order-by-id.api.mdx b/demo/docs/petstore/get-order-by-id.api.mdx index 8064ad6de..2c0d83a9b 100644 --- a/demo/docs/petstore/get-order-by-id.api.mdx +++ b/demo/docs/petstore/get-order-by-id.api.mdx @@ -4,7 +4,7 @@ description: "For valid response try integer IDs with value <= 5 or > 10. Other sidebar_label: Find purchase order by ID hide_title: true hide_table_of_contents: true -api: {"tags":["store"],"description":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions","operationId":"getOrderById","parameters":[{"name":"orderId","in":"path","description":"ID of pet that needs to be fetched","required":true,"schema":{"type":"integer","format":"int64","minimum":1,"maximum":5}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Order ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"petId":{"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"quantity":{"type":"integer","format":"int32","minimum":1,"default":1},"shipDate":{"description":"Estimated ship date","type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"description":"Indicates whenever order was completed or not","type":"boolean","default":false,"readOnly":true},"requestId":{"description":"Unique Request Id","type":"string","writeOnly":true}},"xml":{"name":"Order"}}},"application/xml":{"schema":{"type":"object","properties":{"id":{"description":"Order ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"petId":{"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"quantity":{"type":"integer","format":"int32","minimum":1,"default":1},"shipDate":{"description":"Estimated ship date","type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"description":"Indicates whenever order was completed or not","type":"boolean","default":false,"readOnly":true},"requestId":{"description":"Unique Request Id","type":"string","writeOnly":true}},"xml":{"name":"Order"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}},"method":"get","path":"/store/order/{orderId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Find purchase order by ID","description":{"content":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions","type":"text/plain"},"url":{"path":["store","order",":orderId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be fetched","type":"text/plain"},"type":"any","value":"","key":"orderId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["store"],"description":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions","operationId":"getOrderById","parameters":[{"name":"orderId","in":"path","description":"ID of pet that needs to be fetched","required":true,"schema":{"type":"integer","format":"int64","minimum":1,"maximum":5}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Order ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"petId":{"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"quantity":{"type":"integer","format":"int32","minimum":1,"default":1},"shipDate":{"description":"Estimated ship date","type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"description":"Indicates whenever order was completed or not","type":"boolean","default":false,"readOnly":true},"requestId":{"description":"Unique Request Id","type":"string","writeOnly":true}},"xml":{"name":"Order"}}},"application/xml":{"schema":{"type":"object","properties":{"id":{"description":"Order ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"petId":{"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"quantity":{"type":"integer","format":"int32","minimum":1,"default":1},"shipDate":{"description":"Estimated ship date","type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"description":"Indicates whenever order was completed or not","type":"boolean","default":false,"readOnly":true},"requestId":{"description":"Unique Request Id","type":"string","writeOnly":true}},"xml":{"name":"Order"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}},"method":"get","path":"/store/order/{orderId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Find purchase order by ID","description":{"content":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions","type":"text/plain"},"url":{"path":["store","order",":orderId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be fetched","type":"text/plain"},"type":"any","value":"","key":"orderId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Find purchase order by ID' (get-order-by-id)" @@ -29,7 +29,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values w successful operation -
Schema
    = 1`"} defaultValue={1}>
Schema
    = 1`"} defaultValue={1}>
\n 0\n 0\n 1\n 2022-09-13\n placed\n false\n"} language={"xml"}>
+
Schema
    = 1`"} defaultValue={1}>
Schema
    = 1`"} defaultValue={1}>
\n 0\n 0\n 1\n 2022-09-14\n placed\n false\n"} language={"xml"}>
Invalid ID supplied diff --git a/demo/docs/petstore/get-pet-by-id.api.mdx b/demo/docs/petstore/get-pet-by-id.api.mdx index f82634e75..e6824ec81 100644 --- a/demo/docs/petstore/get-pet-by-id.api.mdx +++ b/demo/docs/petstore/get-pet-by-id.api.mdx @@ -4,7 +4,7 @@ description: "Returns a single pet" sidebar_label: Find pet by ID hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"Returns a single pet","operationId":"getPetById","parameters":[{"name":"petId","in":"path","description":"ID of pet to return","required":true,"deprecated":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Find pet by ID","description":{"content":"Returns a single pet","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet to return","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} +api: {"tags":["pet"],"description":"Returns a single pet","operationId":"getPetById","parameters":[{"name":"petId","in":"path","description":"ID of pet to return","required":true,"deprecated":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Find pet by ID","description":{"content":"Returns a single pet","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet to return","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "get api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Find pet by ID' (get-pet-by-id)" diff --git a/demo/docs/petstore/get-user-by-name.api.mdx b/demo/docs/petstore/get-user-by-name.api.mdx index b24772229..a84ec0cfb 100644 --- a/demo/docs/petstore/get-user-by-name.api.mdx +++ b/demo/docs/petstore/get-user-by-name.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Get user by user name hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"","operationId":"getUserByName","parameters":[{"name":"username","in":"path","description":"The name that needs to be fetched. Use user1 for testing. ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}},"application/xml":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}},"method":"get","path":"/user/{username}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Get user by user name","description":{"content":"","type":"text/plain"},"url":{"path":["user",":username"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name that needs to be fetched. Use user1 for testing. ","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["user"],"description":"","operationId":"getUserByName","parameters":[{"name":"username","in":"path","description":"The name that needs to be fetched. Use user1 for testing. ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}},"application/xml":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}},"method":"get","path":"/user/{username}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Get user by user name","description":{"content":"","type":"text/plain"},"url":{"path":["user",":username"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name that needs to be fetched. Use user1 for testing. ","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Get user by user name' (get-user-by-name)" @@ -25,7 +25,7 @@ import TabItem from "@theme/TabItem"; successful operation -
Schema
    pet object
  • oneOf
    category Category
    sub object
    +
    Schema
      pet object
      oneOf
      category Category
      sub object
      Test Sub Category @@ -45,7 +45,7 @@ Tags attached to the pet Type of a pet -
      = 1`"} defaultValue={1}>
      = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
    Schema
      pet object
    • oneOf
      category Category
      sub object
      +
      = 1`"} defaultValue={1}>
    = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
Schema
    pet object
    oneOf
    category Category
    sub object
    Test Sub Category @@ -65,7 +65,7 @@ Tags attached to the pet Type of a pet -
    = 1`"} defaultValue={1}>
    = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
\n 0\n \n 0\n \n 0\n string\n \n string\n \n \n string\n string\n \n \n 0\n string\n \n available\n \n lazy\n \n \n string\n string\n string\n user@example.com\n string\n string\n 0\n"} language={"xml"}>
+
= 1`"} defaultValue={1}>
= 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>\n 0\n \n 0\n \n 0\n string\n \n string\n \n \n string\n string\n \n \n 0\n string\n \n available\n \n lazy\n \n \n string\n string\n string\n user@example.com\n string\n string\n 0\n"} language={"xml"}>
Invalid username supplied diff --git a/demo/docs/petstore/login-user.api.mdx b/demo/docs/petstore/login-user.api.mdx index c62ac2b55..0ae461a6e 100644 --- a/demo/docs/petstore/login-user.api.mdx +++ b/demo/docs/petstore/login-user.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Logs user into the system hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"","operationId":"loginUser","parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"schema":{"type":"string"}},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","headers":{"X-Rate-Limit":{"description":"calls per hour allowed by the user","schema":{"type":"integer","format":"int32"}},"X-Expires-After":{"description":"date in UTC when token expires","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"type":"string"},"examples":{"response":{"value":"OK"}}},"application/xml":{"schema":{"type":"string"},"examples":{"response":{"value":" OK "}}},"text/plain":{"examples":{"response":{"value":"OK"}}}}},"400":{"description":"Invalid username/password supplied"}},"method":"get","path":"/user/login","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Logs user into the system","description":{"content":"","type":"text/plain"},"url":{"path":["user","login"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The user name for login","type":"text/plain"},"key":"username","value":""},{"disabled":false,"description":{"content":"(Required) The password for login in clear text","type":"text/plain"},"key":"password","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["user"],"description":"","operationId":"loginUser","parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"schema":{"type":"string"}},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","headers":{"X-Rate-Limit":{"description":"calls per hour allowed by the user","schema":{"type":"integer","format":"int32"}},"X-Expires-After":{"description":"date in UTC when token expires","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"type":"string"},"examples":{"response":{"value":"OK"}}},"application/xml":{"schema":{"type":"string"},"examples":{"response":{"value":" OK "}}},"text/plain":{"examples":{"response":{"value":"OK"}}}}},"400":{"description":"Invalid username/password supplied"}},"method":"get","path":"/user/login","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Logs user into the system","description":{"content":"","type":"text/plain"},"url":{"path":["user","login"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The user name for login","type":"text/plain"},"key":"username","value":""},{"disabled":false,"description":{"content":"(Required) The password for login in clear text","type":"text/plain"},"key":"password","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'Logs user into the system' (login-user)" @@ -25,11 +25,11 @@ import TabItem from "@theme/TabItem"; successful operation -
Response Headers
= 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
Invalid user supplied diff --git a/demo/docs/petstore/upload-file.api.mdx b/demo/docs/petstore/upload-file.api.mdx index afa348b29..48d7d014f 100644 --- a/demo/docs/petstore/upload-file.api.mdx +++ b/demo/docs/petstore/upload-file.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: uploads an image hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"","operationId":"uploadFile","parameters":[{"name":"petId","in":"path","description":"ID of pet to update","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}}}}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"method":"post","path":"/pet/{petId}/uploadImage","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"uploads an image","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId","uploadImage"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet to update","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/octet-stream"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"file"},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"","operationId":"uploadFile","parameters":[{"name":"petId","in":"path","description":"ID of pet to update","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}}}}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"method":"post","path":"/pet/{petId}/uploadImage","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"uploads an image","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId","uploadImage"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet to update","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/octet-stream"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"file"},"auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "post api-method" info_path: petstore/swagger-petstore-yaml custom_edit_url: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs/issues/new?labels=documentation&template=documentation_problem.md&title=[Documentation] Requesting changes to 'uploads an image' (upload-file)" diff --git a/demo/docs/petstore_versioned/1.0.0/create-user.api.mdx b/demo/docs/petstore_versioned/1.0.0/create-user.api.mdx index ef5ce60c3..b682726dd 100644 --- a/demo/docs/petstore_versioned/1.0.0/create-user.api.mdx +++ b/demo/docs/petstore_versioned/1.0.0/create-user.api.mdx @@ -28,7 +28,7 @@ This can only be done by the logged in user. Created user object -
successful operation diff --git a/demo/docs/petstore_versioned/1.0.0/create-users-with-array-input.api.mdx b/demo/docs/petstore_versioned/1.0.0/create-users-with-array-input.api.mdx index 1c50cd076..5507e6d1f 100644 --- a/demo/docs/petstore_versioned/1.0.0/create-users-with-array-input.api.mdx +++ b/demo/docs/petstore_versioned/1.0.0/create-users-with-array-input.api.mdx @@ -24,7 +24,7 @@ import TabItem from "@theme/TabItem"; List of user object -
successful operation diff --git a/demo/docs/petstore_versioned/1.0.0/create-users-with-list-input.api.mdx b/demo/docs/petstore_versioned/1.0.0/create-users-with-list-input.api.mdx index c73b57c33..c4f6cb58b 100644 --- a/demo/docs/petstore_versioned/1.0.0/create-users-with-list-input.api.mdx +++ b/demo/docs/petstore_versioned/1.0.0/create-users-with-list-input.api.mdx @@ -24,7 +24,7 @@ import TabItem from "@theme/TabItem"; List of user object -
successful operation diff --git a/demo/docs/petstore_versioned/1.0.0/get-order-by-id.api.mdx b/demo/docs/petstore_versioned/1.0.0/get-order-by-id.api.mdx index ecb8b891f..0de864189 100644 --- a/demo/docs/petstore_versioned/1.0.0/get-order-by-id.api.mdx +++ b/demo/docs/petstore_versioned/1.0.0/get-order-by-id.api.mdx @@ -28,7 +28,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values w successful operation -
Schema
    = 1`"} defaultValue={1}>
Schema
    = 1`"} defaultValue={1}>
\n 0\n 0\n 1\n 2022-09-13\n placed\n false\n"} language={"xml"}>
+
Schema
    = 1`"} defaultValue={1}>
Schema
    = 1`"} defaultValue={1}>
\n 0\n 0\n 1\n 2022-09-14\n placed\n false\n"} language={"xml"}>
Invalid ID supplied diff --git a/demo/docs/petstore_versioned/1.0.0/get-user-by-name.api.mdx b/demo/docs/petstore_versioned/1.0.0/get-user-by-name.api.mdx index c19ccf3e8..4b925832f 100644 --- a/demo/docs/petstore_versioned/1.0.0/get-user-by-name.api.mdx +++ b/demo/docs/petstore_versioned/1.0.0/get-user-by-name.api.mdx @@ -24,7 +24,7 @@ import TabItem from "@theme/TabItem"; successful operation -
Schema
    pet object
  • oneOf
    category Category
    sub object
    +
    Schema
      pet object
      oneOf
      category Category
      sub object
      Test Sub Category @@ -44,7 +44,7 @@ Tags attached to the pet Type of a pet -
      = 1`"} defaultValue={1}>
      = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
    Schema
      pet object
    • oneOf
      category Category
      sub object
      +
      = 1`"} defaultValue={1}>
    = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
Schema
    pet object
    oneOf
    category Category
    sub object
    Test Sub Category @@ -64,7 +64,7 @@ Tags attached to the pet Type of a pet -
    = 1`"} defaultValue={1}>
    = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
\n 0\n \n 0\n \n 0\n string\n \n string\n \n \n string\n string\n \n \n 0\n string\n \n available\n \n lazy\n \n \n string\n string\n string\n user@example.com\n string\n string\n 0\n"} language={"xml"}>
+
= 1`"} defaultValue={1}>
= 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>\n 0\n \n 0\n \n 0\n string\n \n string\n \n \n string\n string\n \n \n 0\n string\n \n available\n \n lazy\n \n \n string\n string\n string\n user@example.com\n string\n string\n 0\n"} language={"xml"}>
Invalid username supplied diff --git a/demo/docs/petstore_versioned/1.0.0/login-user.api.mdx b/demo/docs/petstore_versioned/1.0.0/login-user.api.mdx index e57674b04..1665cff19 100644 --- a/demo/docs/petstore_versioned/1.0.0/login-user.api.mdx +++ b/demo/docs/petstore_versioned/1.0.0/login-user.api.mdx @@ -24,11 +24,11 @@ import TabItem from "@theme/TabItem"; successful operation -
Response Headers
= 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
Invalid user supplied diff --git a/demo/docs/petstore_versioned/add-pet.api.mdx b/demo/docs/petstore_versioned/add-pet.api.mdx index 33c8b8803..c2ec1e342 100644 --- a/demo/docs/petstore_versioned/add-pet.api.mdx +++ b/demo/docs/petstore_versioned/add-pet.api.mdx @@ -4,7 +4,7 @@ description: "Add new pet to the store inventory." sidebar_label: Add a new pet to the store hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"Add new pet to the store inventory.","operationId":"addPet","responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"C#","source":"PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey(\"your api key\");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = \"Rex\";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n"},{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}]}},"application/xml":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"hooray"}}}}},"description":"Pet object that needs to be added to the store","required":true},"method":"post","path":"/pet","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Add a new pet to the store","description":{"content":"Add new pet to the store inventory.","type":"text/plain"},"url":{"path":["pet"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"disabled":false,"description":{"content":"The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US","type":"text/plain"},"key":"Accept-Language","value":""},{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"Add new pet to the store inventory.","operationId":"addPet","responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"C#","source":"PetStore.v1.Pet pet = new PetStore.v1.Pet();\npet.setApiKey(\"your api key\");\npet.petType = PetStore.v1.Pet.TYPE_DOG;\npet.name = \"Rex\";\n// set other fields\nPetStoreResponse response = pet.create();\nif (response.statusCode == HttpStatusCode.Created)\n{\n // Successfully created\n}\nelse\n{\n // Something wrong -- check response for errors\n Console.WriteLine(response.getRawResponse());\n}\n"},{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->create($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}]}},"application/xml":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"hooray"}}}}},"description":"Pet object that needs to be added to the store","required":true},"method":"post","path":"/pet","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Add a new pet to the store","description":{"content":"Add new pet to the store inventory.","type":"text/plain"},"url":{"path":["pet"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"disabled":false,"description":{"content":"The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US","type":"text/plain"},"key":"Accept-Language","value":""},{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "post api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/create-user.api.mdx b/demo/docs/petstore_versioned/create-user.api.mdx index 2b079b0bd..6a18368be 100644 --- a/demo/docs/petstore_versioned/create-user.api.mdx +++ b/demo/docs/petstore_versioned/create-user.api.mdx @@ -4,7 +4,7 @@ description: "This can only be done by the logged in user." sidebar_label: Create user hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"This can only be done by the logged in user.","operationId":"createUser","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}},"description":"Created user object","required":true},"method":"post","path":"/user","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Create user","description":{"content":"This can only be done by the logged in user.","type":"text/plain"},"url":{"path":["user"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["user"],"description":"This can only be done by the logged in user.","operationId":"createUser","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}},"description":"Created user object","required":true},"method":"post","path":"/user","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Create user","description":{"content":"This can only be done by the logged in user.","type":"text/plain"},"url":{"path":["user"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: petstore_versioned/swagger-petstore-yaml --- @@ -28,7 +28,7 @@ This can only be done by the logged in user. Created user object -
successful operation diff --git a/demo/docs/petstore_versioned/create-users-with-array-input.api.mdx b/demo/docs/petstore_versioned/create-users-with-array-input.api.mdx index 1aa2bac64..27d143a9a 100644 --- a/demo/docs/petstore_versioned/create-users-with-array-input.api.mdx +++ b/demo/docs/petstore_versioned/create-users-with-array-input.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Creates list of users with given input array hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"","operationId":"createUsersWithArrayInput","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"description":"List of user object","required":true},"method":"post","path":"/user/createWithArray","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":[{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0}],"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Creates list of users with given input array","description":{"content":"","type":"text/plain"},"url":{"path":["user","createWithArray"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["user"],"description":"","operationId":"createUsersWithArrayInput","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"description":"List of user object","required":true},"method":"post","path":"/user/createWithArray","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":[{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0}],"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Creates list of users with given input array","description":{"content":"","type":"text/plain"},"url":{"path":["user","createWithArray"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: petstore_versioned/swagger-petstore-yaml --- @@ -24,7 +24,7 @@ import TabItem from "@theme/TabItem"; List of user object -
successful operation diff --git a/demo/docs/petstore_versioned/create-users-with-list-input.api.mdx b/demo/docs/petstore_versioned/create-users-with-list-input.api.mdx index c1d578d20..bd1fd5731 100644 --- a/demo/docs/petstore_versioned/create-users-with-list-input.api.mdx +++ b/demo/docs/petstore_versioned/create-users-with-list-input.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Creates list of users with given input list hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"","operationId":"createUsersWithListInput","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"description":"List of user object","required":true},"method":"post","path":"/user/createWithList","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":[{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0}],"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Creates list of users with given input list","description":{"content":"","type":"text/plain"},"url":{"path":["user","createWithList"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["user"],"description":"","operationId":"createUsersWithListInput","responses":{"default":{"description":"successful operation"}},"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"description":"List of user object","required":true},"method":"post","path":"/user/createWithList","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"jsonRequestBodyExample":[{"pet":{"category":{"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"name":"string"}],"status":"available","petType":{"huntingSkill":"adventurous"}},"username":"John78","firstName":"John","lastName":"Smith","email":"john.smith@example.com","password":"drowssaP123","phone":"+1-202-555-0192","userStatus":0}],"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Creates list of users with given input list","description":{"content":"","type":"text/plain"},"url":{"path":["user","createWithList"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: petstore_versioned/swagger-petstore-yaml --- @@ -24,7 +24,7 @@ import TabItem from "@theme/TabItem"; List of user object -
successful operation diff --git a/demo/docs/petstore_versioned/delete-order.api.mdx b/demo/docs/petstore_versioned/delete-order.api.mdx index 6a74ee218..09efbaf58 100644 --- a/demo/docs/petstore_versioned/delete-order.api.mdx +++ b/demo/docs/petstore_versioned/delete-order.api.mdx @@ -4,7 +4,7 @@ description: "For valid response try integer IDs with value < 1000. Anything abo sidebar_label: Delete purchase order by ID hide_title: true hide_table_of_contents: true -api: {"tags":["store"],"description":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors","operationId":"deleteOrder","parameters":[{"name":"orderId","in":"path","description":"ID of the order that needs to be deleted","required":true,"schema":{"type":"string","minimum":1}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}},"method":"delete","path":"/store/order/{orderId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Delete purchase order by ID","description":{"content":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors","type":"text/plain"},"url":{"path":["store","order",":orderId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the order that needs to be deleted","type":"text/plain"},"type":"any","value":"","key":"orderId"}]},"method":"DELETE"}} +api: {"tags":["store"],"description":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors","operationId":"deleteOrder","parameters":[{"name":"orderId","in":"path","description":"ID of the order that needs to be deleted","required":true,"schema":{"type":"string","minimum":1}}],"responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}},"method":"delete","path":"/store/order/{orderId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Delete purchase order by ID","description":{"content":"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors","type":"text/plain"},"url":{"path":["store","order",":orderId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of the order that needs to be deleted","type":"text/plain"},"type":"any","value":"","key":"orderId"}]},"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/delete-pet.api.mdx b/demo/docs/petstore_versioned/delete-pet.api.mdx index 7e79b21ce..fba303c2e 100644 --- a/demo/docs/petstore_versioned/delete-pet.api.mdx +++ b/demo/docs/petstore_versioned/delete-pet.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Deletes a pet hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"","operationId":"deletePet","parameters":[{"name":"api_key","in":"header","required":false,"schema":{"type":"string"},"example":"Bearer "},{"name":"petId","in":"path","description":"Pet id to delete","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Invalid pet value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"delete","path":"/pet/{petId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Deletes a pet","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) Pet id to delete","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"disabled":false,"description":{"content":"","type":"text/plain"},"key":"api_key","value":""}],"method":"DELETE","auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"","operationId":"deletePet","parameters":[{"name":"api_key","in":"header","required":false,"schema":{"type":"string"},"example":"Bearer "},{"name":"petId","in":"path","description":"Pet id to delete","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"400":{"description":"Invalid pet value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"delete","path":"/pet/{petId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Deletes a pet","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) Pet id to delete","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"disabled":false,"description":{"content":"","type":"text/plain"},"key":"api_key","value":""}],"method":"DELETE","auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "delete api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/delete-user.api.mdx b/demo/docs/petstore_versioned/delete-user.api.mdx index 97023409e..10b17b14d 100644 --- a/demo/docs/petstore_versioned/delete-user.api.mdx +++ b/demo/docs/petstore_versioned/delete-user.api.mdx @@ -4,7 +4,7 @@ description: "This can only be done by the logged in user." sidebar_label: Delete user hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"This can only be done by the logged in user.","operationId":"deleteUser","parameters":[{"name":"username","in":"path","description":"The name that needs to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}},"method":"delete","path":"/user/{username}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Delete user","description":{"content":"This can only be done by the logged in user.","type":"text/plain"},"url":{"path":["user",":username"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name that needs to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"method":"DELETE"}} +api: {"tags":["user"],"description":"This can only be done by the logged in user.","operationId":"deleteUser","parameters":[{"name":"username","in":"path","description":"The name that needs to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}},"method":"delete","path":"/user/{username}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Delete user","description":{"content":"This can only be done by the logged in user.","type":"text/plain"},"url":{"path":["user",":username"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name that needs to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/find-pets-by-status.api.mdx b/demo/docs/petstore_versioned/find-pets-by-status.api.mdx index a0dc82270..bd6e6f054 100644 --- a/demo/docs/petstore_versioned/find-pets-by-status.api.mdx +++ b/demo/docs/petstore_versioned/find-pets-by-status.api.mdx @@ -4,7 +4,7 @@ description: "Multiple status values can be provided with comma separated string sidebar_label: Finds Pets by status hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"Multiple status values can be provided with comma separated strings","operationId":"findPetsByStatus","parameters":[{"name":"status","in":"query","description":"Status values that need to be considered for filter","required":true,"style":"form","schema":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"string","enum":["available","pending","sold"],"default":"available"}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Finds Pets by status","description":{"content":"Multiple status values can be provided with comma separated strings","type":"text/plain"},"url":{"path":["pet","findByStatus"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Status values that need to be considered for filter","type":"text/plain"},"key":"status","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"Multiple status values can be provided with comma separated strings","operationId":"findPetsByStatus","parameters":[{"name":"status","in":"query","description":"Status values that need to be considered for filter","required":true,"style":"form","schema":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"string","enum":["available","pending","sold"],"default":"available"}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Finds Pets by status","description":{"content":"Multiple status values can be provided with comma separated strings","type":"text/plain"},"url":{"path":["pet","findByStatus"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Status values that need to be considered for filter","type":"text/plain"},"key":"status","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "get api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/find-pets-by-tags.api.mdx b/demo/docs/petstore_versioned/find-pets-by-tags.api.mdx index ad62898fc..43c193976 100644 --- a/demo/docs/petstore_versioned/find-pets-by-tags.api.mdx +++ b/demo/docs/petstore_versioned/find-pets-by-tags.api.mdx @@ -4,7 +4,7 @@ description: "Multiple tags can be provided with comma separated strings. Use ta sidebar_label: Finds Pets by tags hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","operationId":"findPetsByTags","deprecated":true,"parameters":[{"name":"tags","in":"query","description":"Tags to filter by","required":true,"style":"form","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Finds Pets by tags","description":{"content":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","type":"text/plain"},"url":{"path":["pet","findByTags"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Tags to filter by","type":"text/plain"},"key":"tags","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","operationId":"findPetsByTags","deprecated":true,"parameters":[{"name":"tags","in":"query","description":"Tags to filter by","required":true,"style":"form","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Finds Pets by tags","description":{"content":"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.","type":"text/plain"},"url":{"path":["pet","findByTags"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) Tags to filter by","type":"text/plain"},"key":"tags","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "get api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/get-inventory.api.mdx b/demo/docs/petstore_versioned/get-inventory.api.mdx index 45329586b..904690344 100644 --- a/demo/docs/petstore_versioned/get-inventory.api.mdx +++ b/demo/docs/petstore_versioned/get-inventory.api.mdx @@ -4,7 +4,7 @@ description: "Returns a map of status codes to quantities" sidebar_label: Returns pet inventories by status hide_title: true hide_table_of_contents: true -api: {"tags":["store"],"description":"Returns a map of status codes to quantities","operationId":"getInventory","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"api_key":[]}],"method":"get","path":"/store/inventory","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Returns pet inventories by status","description":{"content":"Returns a map of status codes to quantities","type":"text/plain"},"url":{"path":["store","inventory"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} +api: {"tags":["store"],"description":"Returns a map of status codes to quantities","operationId":"getInventory","responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer","format":"int32"}}}}}},"security":[{"api_key":[]}],"method":"get","path":"/store/inventory","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Returns pet inventories by status","description":{"content":"Returns a map of status codes to quantities","type":"text/plain"},"url":{"path":["store","inventory"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "get api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/get-order-by-id.api.mdx b/demo/docs/petstore_versioned/get-order-by-id.api.mdx index 74d926654..a337057be 100644 --- a/demo/docs/petstore_versioned/get-order-by-id.api.mdx +++ b/demo/docs/petstore_versioned/get-order-by-id.api.mdx @@ -4,7 +4,7 @@ description: "For valid response try integer IDs with value <= 5 or > 10. Other sidebar_label: Find purchase order by ID hide_title: true hide_table_of_contents: true -api: {"tags":["store"],"description":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions","operationId":"getOrderById","parameters":[{"name":"orderId","in":"path","description":"ID of pet that needs to be fetched","required":true,"schema":{"type":"integer","format":"int64","minimum":1,"maximum":5}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Order ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"petId":{"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"quantity":{"type":"integer","format":"int32","minimum":1,"default":1},"shipDate":{"description":"Estimated ship date","type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"description":"Indicates whenever order was completed or not","type":"boolean","default":false,"readOnly":true},"requestId":{"description":"Unique Request Id","type":"string","writeOnly":true}},"xml":{"name":"Order"}}},"application/xml":{"schema":{"type":"object","properties":{"id":{"description":"Order ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"petId":{"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"quantity":{"type":"integer","format":"int32","minimum":1,"default":1},"shipDate":{"description":"Estimated ship date","type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"description":"Indicates whenever order was completed or not","type":"boolean","default":false,"readOnly":true},"requestId":{"description":"Unique Request Id","type":"string","writeOnly":true}},"xml":{"name":"Order"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}},"method":"get","path":"/store/order/{orderId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Find purchase order by ID","description":{"content":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions","type":"text/plain"},"url":{"path":["store","order",":orderId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be fetched","type":"text/plain"},"type":"any","value":"","key":"orderId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["store"],"description":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions","operationId":"getOrderById","parameters":[{"name":"orderId","in":"path","description":"ID of pet that needs to be fetched","required":true,"schema":{"type":"integer","format":"int64","minimum":1,"maximum":5}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Order ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"petId":{"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"quantity":{"type":"integer","format":"int32","minimum":1,"default":1},"shipDate":{"description":"Estimated ship date","type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"description":"Indicates whenever order was completed or not","type":"boolean","default":false,"readOnly":true},"requestId":{"description":"Unique Request Id","type":"string","writeOnly":true}},"xml":{"name":"Order"}}},"application/xml":{"schema":{"type":"object","properties":{"id":{"description":"Order ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"petId":{"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"quantity":{"type":"integer","format":"int32","minimum":1,"default":1},"shipDate":{"description":"Estimated ship date","type":"string","format":"date-time"},"status":{"type":"string","description":"Order Status","enum":["placed","approved","delivered"]},"complete":{"description":"Indicates whenever order was completed or not","type":"boolean","default":false,"readOnly":true},"requestId":{"description":"Unique Request Id","type":"string","writeOnly":true}},"xml":{"name":"Order"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Order not found"}},"method":"get","path":"/store/order/{orderId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Find purchase order by ID","description":{"content":"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions","type":"text/plain"},"url":{"path":["store","order",":orderId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be fetched","type":"text/plain"},"type":"any","value":"","key":"orderId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: petstore_versioned/swagger-petstore-yaml --- @@ -28,7 +28,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values w successful operation -
Schema
    = 1`"} defaultValue={1}>
Schema
    = 1`"} defaultValue={1}>
\n 0\n 0\n 1\n 2022-09-13\n placed\n false\n"} language={"xml"}>
+
Schema
    = 1`"} defaultValue={1}>
Schema
    = 1`"} defaultValue={1}>
\n 0\n 0\n 1\n 2022-09-14\n placed\n false\n"} language={"xml"}>
Invalid ID supplied diff --git a/demo/docs/petstore_versioned/get-pet-by-id.api.mdx b/demo/docs/petstore_versioned/get-pet-by-id.api.mdx index a120572e8..143637e36 100644 --- a/demo/docs/petstore_versioned/get-pet-by-id.api.mdx +++ b/demo/docs/petstore_versioned/get-pet-by-id.api.mdx @@ -4,7 +4,7 @@ description: "Returns a single pet" sidebar_label: Find pet by ID hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"Returns a single pet","operationId":"getPetById","parameters":[{"name":"petId","in":"path","description":"ID of pet to return","required":true,"deprecated":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Find pet by ID","description":{"content":"Returns a single pet","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet to return","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} +api: {"tags":["pet"],"description":"Returns a single pet","operationId":"getPetById","parameters":[{"name":"petId","in":"path","description":"ID of pet to return","required":true,"deprecated":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Find pet by ID","description":{"content":"Returns a single pet","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet to return","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET","auth":{"type":"apikey","apikey":[{"type":"any","value":"api_key","key":"key"},{"type":"any","value":"","key":"value"},{"type":"any","value":"header","key":"in"}]}}} sidebar_class_name: "get api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/get-user-by-name.api.mdx b/demo/docs/petstore_versioned/get-user-by-name.api.mdx index ff05f0b88..dd4ead840 100644 --- a/demo/docs/petstore_versioned/get-user-by-name.api.mdx +++ b/demo/docs/petstore_versioned/get-user-by-name.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Get user by user name hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"","operationId":"getUserByName","parameters":[{"name":"username","in":"path","description":"The name that needs to be fetched. Use user1 for testing. ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}},"application/xml":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}},"method":"get","path":"/user/{username}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Get user by user name","description":{"content":"","type":"text/plain"},"url":{"path":["user",":username"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name that needs to be fetched. Use user1 for testing. ","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["user"],"description":"","operationId":"getUserByName","parameters":[{"name":"username","in":"path","description":"The name that needs to be fetched. Use user1 for testing. ","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}},"application/xml":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"title":"pet","type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},"dog":{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},"bee":{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}}},"properties":{"id":{"externalDocs":{"description":"Find more info here","url":"https://example.com"},"description":"Pet ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"category":{"description":"Categories this pet belongs to","allOf":[{"type":"object","properties":{"id":{"description":"Category ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Category name","type":"string","minLength":1},"sub":{"description":"Test Sub Category","type":"object","properties":{"prop1":{"type":"string","description":"Dumb Property"}}}},"xml":{"name":"Category"}}]},"name":{"description":"The name given to a pet","type":"string","example":"Guru"},"photoUrls":{"description":"The list of URL to a cute photos featuring pet","type":"array","maxItems":20,"xml":{"name":"photoUrl","wrapped":true},"items":{"type":"string","format":"url"}},"friend":{"allOf":["circular(pet)"]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}},"status":{"type":"string","description":"Pet status in the store","enum":["available","pending","sold"]},"petType":{"description":"Type of a pet","type":"string","oneOf":[{"title":"cat","description":"A representation of a cat","allOf":["circular(pet)",{"type":"object","properties":{"huntingSkill":{"type":"string","description":"The measured skill for hunting","default":"lazy","example":"adventurous","enum":["clueless","lazy","adventurous","aggressive"]}},"required":["huntingSkill"]}]},{"title":"dog","description":"A representation of a dog","allOf":["circular(pet)",{"type":"object","properties":{"packSize":{"type":"integer","format":"int32","description":"The size of the pack the dog is from","default":1,"minimum":1}},"required":["packSize"]}]},{"title":"bee","description":"A representation of a honey bee","allOf":["circular(pet)",{"type":"object","properties":{"honeyPerDay":{"type":"number","description":"Average amount of honey produced per day in ounces","example":3.14,"multipleOf":0.01}},"required":["honeyPerDay"]}]}]}},"xml":{"name":"Pet"}},{"title":"tag","type":"object","properties":{"id":{"description":"Tag ID","allOf":[{"type":"integer","format":"int64","readOnly":true}]},"name":{"description":"Tag name","type":"string","minLength":1}},"xml":{"name":"Tag"}}]},"username":{"description":"User supplied username","type":"string","minLength":4,"example":"John78"},"firstName":{"description":"User first name","type":"string","minLength":1,"example":"John"},"lastName":{"description":"User last name","type":"string","minLength":1,"example":"Smith"},"email":{"description":"User email address","type":"string","format":"email","example":"john.smith@example.com"},"password":{"type":"string","description":"User password, MUST contain a mix of upper and lower case letters, as well as digits","format":"password","minLength":8,"pattern":"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/","example":"drowssaP123"},"phone":{"description":"User phone number in international format","type":"string","pattern":"/^\\+(?:[0-9]-?){6,14}[0-9]$/","example":"+1-202-555-0192"},"userStatus":{"description":"User status","type":"integer","format":"int32"}},"xml":{"name":"User"}}}}},"400":{"description":"Invalid username supplied"},"404":{"description":"User not found"}},"method":"get","path":"/user/{username}","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Get user by user name","description":{"content":"","type":"text/plain"},"url":{"path":["user",":username"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) The name that needs to be fetched. Use user1 for testing. ","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: petstore_versioned/swagger-petstore-yaml --- @@ -24,7 +24,7 @@ import TabItem from "@theme/TabItem"; successful operation -
Schema
    pet object
  • oneOf
    category Category
    sub object
    +
    Schema
      pet object
      oneOf
      category Category
      sub object
      Test Sub Category @@ -44,7 +44,7 @@ Tags attached to the pet Type of a pet -
      = 1`"} defaultValue={1}>
      = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
    Schema
      pet object
    • oneOf
      category Category
      sub object
      +
      = 1`"} defaultValue={1}>
    = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
Schema
    pet object
    oneOf
    category Category
    sub object
    Test Sub Category @@ -64,7 +64,7 @@ Tags attached to the pet Type of a pet -
    = 1`"} defaultValue={1}>
    = 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
\n 0\n \n 0\n \n 0\n string\n \n string\n \n \n string\n string\n \n \n 0\n string\n \n available\n \n lazy\n \n \n string\n string\n string\n user@example.com\n string\n string\n 0\n"} language={"xml"}>
+
= 1`"} defaultValue={1}>
= 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>\n 0\n \n 0\n \n 0\n string\n \n string\n \n \n string\n string\n \n \n 0\n string\n \n available\n \n lazy\n \n \n string\n string\n string\n user@example.com\n string\n string\n 0\n"} language={"xml"}>
Invalid username supplied diff --git a/demo/docs/petstore_versioned/login-user.api.mdx b/demo/docs/petstore_versioned/login-user.api.mdx index e042befde..070d8af36 100644 --- a/demo/docs/petstore_versioned/login-user.api.mdx +++ b/demo/docs/petstore_versioned/login-user.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: Logs user into the system hide_title: true hide_table_of_contents: true -api: {"tags":["user"],"description":"","operationId":"loginUser","parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"schema":{"type":"string"}},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","headers":{"X-Rate-Limit":{"description":"calls per hour allowed by the user","schema":{"type":"integer","format":"int32"}},"X-Expires-After":{"description":"date in UTC when token expires","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"type":"string"},"examples":{"response":{"value":"OK"}}},"application/xml":{"schema":{"type":"string"},"examples":{"response":{"value":" OK "}}},"text/plain":{"examples":{"response":{"value":"OK"}}}}},"400":{"description":"Invalid username/password supplied"}},"method":"get","path":"/user/login","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Logs user into the system","description":{"content":"","type":"text/plain"},"url":{"path":["user","login"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The user name for login","type":"text/plain"},"key":"username","value":""},{"disabled":false,"description":{"content":"(Required) The password for login in clear text","type":"text/plain"},"key":"password","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"tags":["user"],"description":"","operationId":"loginUser","parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"schema":{"type":"string"}},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","headers":{"X-Rate-Limit":{"description":"calls per hour allowed by the user","schema":{"type":"integer","format":"int32"}},"X-Expires-After":{"description":"date in UTC when token expires","schema":{"type":"string","format":"date-time"}}},"content":{"application/json":{"schema":{"type":"string"},"examples":{"response":{"value":"OK"}}},"application/xml":{"schema":{"type":"string"},"examples":{"response":{"value":" OK "}}},"text/plain":{"examples":{"response":{"value":"OK"}}}}},"400":{"description":"Invalid username/password supplied"}},"method":"get","path":"/user/login","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"Logs user into the system","description":{"content":"","type":"text/plain"},"url":{"path":["user","login"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The user name for login","type":"text/plain"},"key":"username","value":""},{"disabled":false,"description":{"content":"(Required) The password for login in clear text","type":"text/plain"},"key":"password","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: petstore_versioned/swagger-petstore-yaml --- @@ -24,11 +24,11 @@ import TabItem from "@theme/TabItem"; successful operation -
Response Headers
= 4 characters`"} defaultValue={undefined}>= 8 characters`, Value must match regular expression `/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/`"} defaultValue={undefined}>
Invalid user supplied diff --git a/demo/docs/petstore_versioned/upload-file.api.mdx b/demo/docs/petstore_versioned/upload-file.api.mdx index 96d0ed360..5186a61a9 100644 --- a/demo/docs/petstore_versioned/upload-file.api.mdx +++ b/demo/docs/petstore_versioned/upload-file.api.mdx @@ -4,7 +4,7 @@ description: "" sidebar_label: uploads an image hide_title: true hide_table_of_contents: true -api: {"tags":["pet"],"description":"","operationId":"uploadFile","parameters":[{"name":"petId","in":"path","description":"ID of pet to update","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}}}}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"method":"post","path":"/pet/{petId}/uploadImage","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"uploads an image","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId","uploadImage"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet to update","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/octet-stream"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"file"},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["pet"],"description":"","operationId":"uploadFile","parameters":[{"name":"petId","in":"path","description":"ID of pet to update","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"type":{"type":"string"},"message":{"type":"string"}}}}}}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"method":"post","path":"/pet/{petId}/uploadImage","servers":[{"url":"https://petstore.swagger.io/v2","description":"Default server"},{"url":"https://petstore.swagger.io/sandbox","description":"Sandbox server"},{"url":"http://127.0.0.1:4010","description":"Prism Mock API (local)"}],"securitySchemes":{"petstore_auth":{"description":"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n","type":"oauth2","flows":{"implicit":{"authorizationUrl":"http://petstore.swagger.io/api/oauth/dialog","scopes":{"write:pets":"modify pets in your account","read:pets":"read your pets"}}}},"api_key":{"description":"For this sample, you can use the api key `special-key` to test the authorization filters.\n","type":"apiKey","name":"api_key","in":"header"}},"info":{"description":"This is a sample server Petstore server.\nYou can find out more about Swagger at\n[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\nFor this sample, you can use the api key `special-key` to test the authorization filters.\n\n## Introduction\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## OpenAPI Specification\nThis API is documented in **OpenAPI format** and is based on\n[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\nIt was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\ntool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\nOpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md).\n\n## Cross-Origin Resource Sharing\nThis API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/).\nAnd that allows cross-domain communication from the browser.\nAll responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n\n## Authentication\n\nPetstore offers two forms of authentication:\n - API Key\n - OAuth2\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n","version":"2.0.0","title":"Swagger Petstore YAML","termsOfService":"http://swagger.io/terms/","contact":{"name":"API Support","email":"apiteam@swagger.io","url":"https://github.com/Redocly/redoc"},"x-logo":{"url":"https://redocly.github.io/redoc/petstore-logo.png","altText":"Petstore logo"},"license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"}},"postman":{"name":"uploads an image","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId","uploadImage"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet to update","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/octet-stream"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"file"},"auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "post api-method" info_path: petstore_versioned/swagger-petstore-yaml --- diff --git a/demo/examples/petstore.yaml b/demo/examples/petstore.yaml index 68560a9d6..fb8b267f9 100644 --- a/demo/examples/petstore.yaml +++ b/demo/examples/petstore.yaml @@ -4,6 +4,8 @@ servers: description: Default server - url: https://petstore.swagger.io/sandbox description: Sandbox server + - url: http://127.0.0.1:4010 + description: Prism Mock API (local) info: description: | This is a sample server Petstore server. @@ -343,9 +345,7 @@ paths: "400": description: Invalid status value security: - - petstore_auth: - - "write:pets" - - "read:pets" + - api_key: [] /pet/findByTags: get: tags: diff --git a/packages/docusaurus-plugin-openapi-docs/src/index.ts b/packages/docusaurus-plugin-openapi-docs/src/index.ts index c121b57e4..93d65e03c 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/index.ts @@ -191,7 +191,7 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; const tagMdTemplate = `--- id: {{{id}}} title: {{{description}}} -description: {{{description}}} +description: "{{{description}}}" custom_edit_url: null --- diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createRequestSchema.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createRequestSchema.ts index aabf149cc..3383e95f5 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createRequestSchema.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createRequestSchema.ts @@ -46,7 +46,7 @@ export function mergeAllOf(allOf: SchemaObject[]) { */ function createAnyOneOf(schema: SchemaObject): any { const type = schema.oneOf ? "oneOf" : "anyOf"; - return create("li", { + return create("div", { children: [ create("div", { children: [ diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createResponseSchema.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createResponseSchema.ts index 706aa5fc1..870dad956 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createResponseSchema.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createResponseSchema.ts @@ -51,7 +51,7 @@ export function mergeAllOf(allOf: SchemaObject[]) { */ function createAnyOneOf(schema: SchemaObject): any { const type = schema.oneOf ? "oneOf" : "anyOf"; - return create("li", { + return create("div", { children: [ create("div", { children: [ diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/createStatusCodes.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/createStatusCodes.ts index 986543624..e47dc10b3 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/createStatusCodes.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/createStatusCodes.ts @@ -70,7 +70,7 @@ function createResponseHeaders(responseHeaders: any) { }: any = headerObj; return create("li", { - class: "schemaItem", + className: "schemaItem", children: [ createDetailsSummary({ children: [ diff --git a/packages/docusaurus-plugin-openapi-docs/src/openapi/openapi.ts b/packages/docusaurus-plugin-openapi-docs/src/openapi/openapi.ts index b43b0dc5e..b5bc4232d 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/openapi/openapi.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/openapi/openapi.ts @@ -119,7 +119,12 @@ function createItems( id: infoId, unversionedId: infoId, title: openapiData.info.title, - description: openapiData.info.description, + description: openapiData.info.description + ? openapiData.info.description.replace( + /((?:^|[^\\])(?:\\{2})*)"/g, + "$1'" + ) + : "", frontMatter: {}, securitySchemes: openapiData.components?.securitySchemes, info: { @@ -194,7 +199,12 @@ function createItems( infoId: infoId ?? "", unversionedId: baseId, title: title, - description: operationObject.description ?? "", + description: operationObject.description + ? operationObject.description.replace( + /((?:^|[^\\])(?:\\{2})*)"/g, + "$1'" + ) + : "", frontMatter: {}, api: { ...defaults, diff --git a/packages/docusaurus-theme-openapi-docs/package.json b/packages/docusaurus-theme-openapi-docs/package.json index 09c179969..6affbbca3 100644 --- a/packages/docusaurus-theme-openapi-docs/package.json +++ b/packages/docusaurus-theme-openapi-docs/package.json @@ -57,6 +57,7 @@ "react-live": "^3.1.1", "react-magic-dropzone": "^1.0.1", "react-markdown": "^8.0.1", + "react-modal": "^3.15.1", "react-redux": "^7.2.0", "redux-devtools-extension": "^2.13.8", "webpack": "^5.61.0", diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/auth-types.ts b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/auth-types.ts index ac9d04531..02f926f64 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/auth-types.ts +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/auth-types.ts @@ -11,6 +11,10 @@ export function getAuthDataKeys(security: { [key: string]: any }) { return ["token"]; } + if (security.type === "oauth2") { + return ["token"]; + } + // Basic Auth if (security.type === "http" && security.scheme === "basic") { return ["username", "password"]; diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/index.tsx new file mode 100644 index 000000000..65d19fbaf --- /dev/null +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/index.tsx @@ -0,0 +1,154 @@ +/* ============================================================================ + * Copyright (c) Palo Alto Networks + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * ========================================================================== */ + +import React from "react"; + +import FormItem from "../FormItem"; +import FormSelect from "../FormSelect"; +import FormTextInput from "../FormTextInput"; +import { useTypedDispatch, useTypedSelector } from "../hooks"; +import { setAuthData, setSelectedAuth } from "./slice"; + +function Authorization() { + const data = useTypedSelector((state) => state.auth.data); + const options = useTypedSelector((state) => state.auth.options); + const selected = useTypedSelector((state) => state.auth.selected); + + const dispatch = useTypedDispatch(); + + if (selected === undefined) { + return null; + } + + const selectedAuth = options[selected]; + + const optionKeys = Object.keys(options); + + return ( +
+ {optionKeys.length > 1 && ( + + { + dispatch(setSelectedAuth(e.target.value)); + }} + /> + + )} + {selectedAuth.map((a) => { + if (a.type === "http" && a.scheme === "bearer") { + return ( + + { + const value = e.target.value.trim(); + dispatch( + setAuthData({ + scheme: a.key, + key: "token", + value: value ? value : undefined, + }) + ); + }} + /> + + ); + } + + if (a.type === "oauth2") { + return ( + + { + const value = e.target.value.trim(); + dispatch( + setAuthData({ + scheme: a.key, + key: "token", + value: value ? value : undefined, + }) + ); + }} + /> + + ); + } + + if (a.type === "http" && a.scheme === "basic") { + return ( + + + { + const value = e.target.value.trim(); + dispatch( + setAuthData({ + scheme: a.key, + key: "username", + value: value ? value : undefined, + }) + ); + }} + /> + + + { + const value = e.target.value.trim(); + dispatch( + setAuthData({ + scheme: a.key, + key: "password", + value: value ? value : undefined, + }) + ); + }} + /> + + + ); + } + + if (a.type === "apiKey") { + return ( + + { + const value = e.target.value.trim(); + dispatch( + setAuthData({ + scheme: a.key, + key: "apiKey", + value: value ? value : undefined, + }) + ); + }} + /> + + ); + } + + return null; + })} +
+ ); +} + +export default Authorization; diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/slice.ts b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/slice.ts index 67bee4b60..3026259f1 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/slice.ts +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Authorization/slice.ts @@ -57,7 +57,7 @@ export function createAuth({ }; options?: ThemeConfig["api"]; }): AuthState { - const storage = createStorage(opts?.authPersistance); + const storage = createStorage("sessionStorage"); let data: AuthState["data"] = {}; let options: AuthState["options"] = {}; diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Body/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Body/index.tsx index d295a71ef..98dbbf859 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Body/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Body/index.tsx @@ -56,6 +56,7 @@ function BodyWrap({ requestBodyMetadata, jsonRequestBodyExample }: Props) { function Body({ requestBodyMetadata, jsonRequestBodyExample }: Props) { const contentType = useTypedSelector((state) => state.contentType.value); + const required = requestBodyMetadata?.required; const dispatch = useTypedDispatch(); @@ -84,7 +85,7 @@ function Body({ requestBodyMetadata, jsonRequestBodyExample }: Props) { if (schema?.format === "binary") { return ( - + { @@ -110,7 +111,7 @@ function Body({ requestBodyMetadata, jsonRequestBodyExample }: Props) { schema?.type === "object" ) { return ( - +
{ if (val.format === "binary") { return ( - + { @@ -147,7 +155,14 @@ function Body({ requestBodyMetadata, jsonRequestBodyExample }: Props) { if (val.enum) { return ( - + { @@ -169,7 +184,14 @@ function Body({ requestBodyMetadata, jsonRequestBodyExample }: Props) { } // TODO: support all the other types. return ( - + { @@ -212,7 +234,7 @@ function Body({ requestBodyMetadata, jsonRequestBodyExample }: Props) { } return ( - + {exampleBodyString} diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Execute/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Execute/index.tsx new file mode 100644 index 000000000..842c63454 --- /dev/null +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Execute/index.tsx @@ -0,0 +1,188 @@ +/* ============================================================================ + * Copyright (c) Palo Alto Networks + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * ========================================================================== */ + +import React from "react"; + +import sdk from "@paloaltonetworks/postman-collection"; +import Modal from "react-modal"; + +import { useTypedDispatch, useTypedSelector } from "../hooks"; +import { Param } from "../ParamOptions/slice"; +import { setResponse } from "../Response/slice"; +import buildPostmanRequest from "./../buildPostmanRequest"; +import makeRequest from "./makeRequest"; + +function validateRequest(params: { + path: Param[]; + query: Param[]; + header: Param[]; + cookie: Param[]; +}) { + for (let paramList of Object.values(params)) { + for (let param of paramList) { + if (param.required && !param.value) { + return false; + } + } + } + return true; +} + +interface Props { + postman: sdk.Request; + proxy?: string; +} + +function Execute({ postman, proxy }: Props) { + const pathParams = useTypedSelector((state) => state.params.path); + const queryParams = useTypedSelector((state) => state.params.query); + const cookieParams = useTypedSelector((state) => state.params.cookie); + const headerParams = useTypedSelector((state) => state.params.header); + const contentType = useTypedSelector((state) => state.contentType.value); + const body = useTypedSelector((state) => state.body); + const accept = useTypedSelector((state) => state.accept.value); + const server = useTypedSelector((state) => state.server.value); + const params = useTypedSelector((state) => state.params); + const auth = useTypedSelector((state) => state.auth); + + const isValidRequest = validateRequest(params); + + const dispatch = useTypedDispatch(); + + const postmanRequest = buildPostmanRequest(postman, { + queryParams, + pathParams, + cookieParams, + contentType, + accept, + headerParams, + body, + server, + auth, + }); + + const delay = (ms: number) => + new Promise((resolve) => setTimeout(resolve, ms)); + + function openModal() { + setIsOpen(true); + } + + function closeModal() { + setIsOpen(false); + } + + function acceptAgreement() { + setIsOpen(false); + setAgreementAccepted(true); + sessionStorage.setItem("agreement-ack", "true"); + } + + const [modalIsOpen, setIsOpen] = React.useState(false); + // Set the following as default value to persist to session and enable modal + // sessionStorage.getItem("agreement-ack") === "true" + const [agreementAccepted, setAgreementAccepted] = React.useState(true); + + const customStyles = { + overlay: { + backdropFilter: "blur(10px)", + backgroundColor: "transparent", + }, + content: { + top: "50%", + left: "50%", + right: "auto", + bottom: "auto", + marginRight: "-50%", + border: "none", + padding: "none", + borderRadius: "var(--openapi-card-border-radius)", + background: "var(--ifm-card-background-color)", + transform: "translate(-50%, -50%)", + maxWidth: "550px", + }, + }; + + if (agreementAccepted) { + return ( + + ); + } else { + return ( + + + +
+
+
+

Terms of Use

+
+
+
+

+ By accepting this agreement the end user acknowledges the + risks of performing authenticated and non-authenticated API + requests from the browser. +

+

+ The end user also accepts the responsibility of safeguarding + API credentials and any potentially sensitive data returned by + the API. +

+

+
+
+
+ + +
+
+
+
+
+
+ ); + } +} + +export default Execute; diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Execute/makeRequest.ts b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Execute/makeRequest.ts new file mode 100644 index 000000000..d46f27927 --- /dev/null +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Execute/makeRequest.ts @@ -0,0 +1,197 @@ +/* ============================================================================ + * Copyright (c) Palo Alto Networks + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * ========================================================================== */ + +import sdk from "@paloaltonetworks/postman-collection"; + +import { Body } from "../Body/slice"; + +function fetchWithtimeout( + url: string, + options: RequestInit, + timeout = 5000 +): any { + return Promise.race([ + fetch(url, options), + new Promise((_, reject) => + setTimeout(() => reject(new Error("Request timed out")), timeout) + ), + ]); +} + +async function loadImage(content: Blob): Promise { + return new Promise((accept, reject) => { + const reader = new FileReader(); + + reader.onabort = () => { + console.log("file reading was aborted"); + reject(); + }; + + reader.onerror = () => { + console.log("file reading has failed"); + reject(); + }; + + reader.onload = () => { + // Do whatever you want with the file contents + const binaryStr = reader.result; + accept(binaryStr); + }; + reader.readAsArrayBuffer(content); + }); +} + +async function makeRequest( + request: sdk.Request, + proxy: string | undefined, + _body: Body +) { + const headers = request.toJSON().header; + + let myHeaders = new Headers(); + if (headers) { + headers.forEach((header: any) => { + if (header.key && header.value) { + myHeaders.append(header.key, header.value); + } + }); + } + + // The following code handles multiple files in the same formdata param. + // It removes the form data params where the src property is an array of filepath strings + // Splits that array into different form data params with src set as a single filepath string + // TODO: + // if (request.body && request.body.mode === 'formdata') { + // let formdata = request.body.formdata, + // formdataArray = []; + // formdata.members.forEach((param) => { + // let key = param.key, + // type = param.type, + // disabled = param.disabled, + // contentType = param.contentType; + // // check if type is file or text + // if (type === 'file') { + // // if src is not of type string we check for array(multiple files) + // if (typeof param.src !== 'string') { + // // if src is an array(not empty), iterate over it and add files as separate form fields + // if (Array.isArray(param.src) && param.src.length) { + // param.src.forEach((filePath) => { + // addFormParam( + // formdataArray, + // key, + // param.type, + // filePath, + // disabled, + // contentType + // ); + // }); + // } + // // if src is not an array or string, or is an empty array, add a placeholder for file path(no files case) + // else { + // addFormParam( + // formdataArray, + // key, + // param.type, + // '/path/to/file', + // disabled, + // contentType + // ); + // } + // } + // // if src is string, directly add the param with src as filepath + // else { + // addFormParam( + // formdataArray, + // key, + // param.type, + // param.src, + // disabled, + // contentType + // ); + // } + // } + // // if type is text, directly add it to formdata array + // else { + // addFormParam( + // formdataArray, + // key, + // param.type, + // param.value, + // disabled, + // contentType + // ); + // } + // }); + // request.body.update({ + // mode: 'formdata', + // formdata: formdataArray, + // }); + // } + + const body = request.body?.toJSON(); + + let myBody: RequestInit["body"] = undefined; + if (body !== undefined && Object.keys(body).length > 0) { + switch (body.mode) { + case "urlencoded": { + myBody = new URLSearchParams(); + if (Array.isArray(body.urlencoded)) { + for (const data of body.urlencoded) { + if (data.key && data.value) { + myBody.append(data.key, data.value); + } + } + } + break; + } + case "raw": { + myBody = (body.raw ?? "").toString(); + break; + } + case "formdata": { + myBody = new FormData(); + if (Array.isArray(body.formdata)) { + for (const data of body.formdata) { + if (data.key && data.value) { + myBody.append(data.key, data.value); + } + } + } + break; + } + case "file": { + if (_body.type === "raw" && _body.content?.type === "file") { + myBody = await loadImage(_body.content.value.content); + } + break; + } + default: + break; + } + } + + const requestOptions: RequestInit = { + method: request.method, + headers: myHeaders, + body: myBody, + }; + + let finalUrl = request.url.toString(); + if (proxy) { + // Ensure the proxy ends with a slash. + let normalizedProxy = proxy.replace(/\/$/, "") + "/"; + finalUrl = normalizedProxy + request.url.toString(); + } + + return await fetchWithtimeout(finalUrl, requestOptions).then( + (response: any) => { + return response.text(); + } + ); +} + +export default makeRequest; diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormItem/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormItem/index.tsx index 9b2ab5231..bd6b824dd 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormItem/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormItem/index.tsx @@ -10,16 +10,25 @@ import React from "react"; import styles from "./styles.module.css"; interface Props { - label: string; + label?: string; type?: string; + required?: boolean | undefined; children?: React.ReactNode; } -function FormItem({ label, type, children }: Props) { +function FormItem({ label, type, required, children }: Props) { return (
{label} {type && — {type}} + {required && ( + + {" "} + + required + + + )}
{children}
); diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormItem/styles.module.css b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormItem/styles.module.css index cce3227ad..74d704f46 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormItem/styles.module.css +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormItem/styles.module.css @@ -5,3 +5,8 @@ .formItem:first-child { margin-top: 0; } + +.required { + font-size: var(--ifm-code-font-size); + color: var(--openapi-required); +} diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/ParamOptions/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/ParamOptions/index.tsx index 91e96e3a2..687d13d53 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/ParamOptions/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/ParamOptions/index.tsx @@ -45,7 +45,7 @@ function ParamOption({ param }: ParamProps) { function ParamOptionWrapper({ param }: ParamProps) { return ( - + ); diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Request/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Request/index.tsx new file mode 100644 index 000000000..2e9b4f799 --- /dev/null +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Request/index.tsx @@ -0,0 +1,71 @@ +/* ============================================================================ + * Copyright (c) Palo Alto Networks + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * ========================================================================== */ + +import React from "react"; + +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import sdk from "@paloaltonetworks/postman-collection"; +import { ParameterObject } from "docusaurus-plugin-openapi-docs/src/openapi/types"; +import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types"; + +import { ThemeConfig } from "../../../types"; +import Accept from "../Accept"; +import Authorization from "../Authorization"; +import Body from "../Body"; +import Execute from "../Execute"; +import { useTypedSelector } from "../hooks"; +import ParamOptions from "../ParamOptions"; +import styles from "./styles.module.css"; + +function Request({ item }: { item: NonNullable }) { + const response = useTypedSelector((state) => state.response.value); + const { siteConfig } = useDocusaurusContext(); + const themeConfig = siteConfig.themeConfig as ThemeConfig; + const options = themeConfig.api; + const postman = new sdk.Request(item.postman); + + const params = { + path: [] as ParameterObject[], + query: [] as ParameterObject[], + header: [] as ParameterObject[], + cookie: [] as ParameterObject[], + }; + + item.parameters?.forEach( + (param: { in: "path" | "query" | "header" | "cookie" }) => { + const paramType = param.in; + const paramsArray: ParameterObject[] = params[paramType]; + paramsArray.push(param as ParameterObject); + } + ); + + return ( +
+
+ +
+

Request

+ {item.servers && ( + + )} +
+
+
+ + + + +
+
+
+ ); +} + +export default Request; diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Request/styles.module.css b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Request/styles.module.css new file mode 100644 index 000000000..c263ba866 --- /dev/null +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Request/styles.module.css @@ -0,0 +1,17 @@ +.optionsPanel:empty { + display: none; +} + +.optionsPanel { + background: var(--openapi-card-background-color); + border-radius: var(--openapi-card-border-radius); + color: var(--ifm-pre-color); + line-height: var(--ifm-pre-line-height); + margin-bottom: var(--ifm-spacing-vertical); + margin-top: 0; + overflow: auto; + padding: var(--ifm-pre-padding); + + /* hack for view calculation when monaco is hidden */ + position: relative; +} diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Response/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Response/index.tsx index ca3333b3a..8c1dd228b 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Response/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Response/index.tsx @@ -7,8 +7,9 @@ import React from "react"; +import CodeBlock from "@theme/CodeBlock"; + import { useTypedDispatch, useTypedSelector } from "../hooks"; -import FloatingButton from "./../FloatingButton"; import { clearResponse } from "./slice"; // TODO: We probably shouldn't attempt to format XML... @@ -43,23 +44,28 @@ function Response() { try { prettyResponse = JSON.stringify(JSON.parse(response), null, 2); } catch { - if (response.startsWith(" dispatch(clearResponse())} label="Clear"> -
-        {prettyResponse || "No Response"}
-      
- +
+ +
+

Response

+ +
+
+ + {prettyResponse || "No Response"} + +
); } diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx index 0046c0f96..a7afeb5b1 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/SecuritySchemes/index.tsx @@ -19,58 +19,63 @@ function SecuritySchemes(props: any) { if (selected === undefined) return null; const selectedAuth = options[selected]; - return ( -
+
+ +

Authorization

+
{selectedAuth.map((auth) => { const isApiKey = auth.type === "apiKey"; const isBearer = auth.type === "http" && auth.key === "Bearer"; - const isClientCredentials = - auth.type === "oauth2" && auth.key === "ClientCredentials"; + const isOauth2 = auth.type === "oauth2"; if (isApiKey || isBearer) { return ( - - - Authorization: {auth.key} - +
-                name: {auth.name}
-                in: {auth.in}
                 type: {auth.type}
+                
+                  name: {auth.name}
+                
+                in: {auth.in}
               
); } - if (isClientCredentials) { + if (isOauth2) { return ( - Authorization: {auth.key}
-                type: {auth.type}
+                
+                  type: {auth.type}
+                
+                {Object.keys(auth.flows).map((flow) => {
+                  return flow: {flow};
+                })}
+                
+                  scopes: {auth.scopes.toString()}
+                
               
); } - return null; + return undefined; })} -
+ ); } diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Server/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Server/index.tsx index 698370b77..3995d0657 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Server/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/Server/index.tsx @@ -71,6 +71,7 @@ function Server() { options={options.map((s) => s.url)} onChange={(e) => dispatch(setServer(e.target.value))} /> + {value?.description}
{value?.variables && Object.keys(value.variables).map((key) => { diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/buildPostmanRequest.ts b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/buildPostmanRequest.ts index d28f2a56e..11eda7053 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/buildPostmanRequest.ts +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/buildPostmanRequest.ts @@ -261,6 +261,25 @@ function buildPostmanRequest( continue; } + if (a.type === "oauth2") { + let token; + if (auth.data[a.key]) { + token = auth.data[a.key].token; + } + if (token === undefined) { + otherHeaders.push({ + key: "Authorization", + value: "Bearer ", + }); + continue; + } + otherHeaders.push({ + key: "Authorization", + value: `Bearer ${token}`, + }); + continue; + } + // Basic Auth if (a.type === "http" && a.scheme === "basic") { const { username, password } = auth.data[a.key]; @@ -276,8 +295,8 @@ function buildPostmanRequest( // API Key if (a.type === "apiKey" && a.in === "header") { - const { apikey } = auth.data[a.key]; - if (apikey === undefined) { + const { apiKey } = auth.data[a.key]; + if (apiKey === undefined) { otherHeaders.push({ key: a.name, value: "", @@ -286,7 +305,7 @@ function buildPostmanRequest( } otherHeaders.push({ key: a.name, - value: apikey, + value: apiKey, }); continue; } diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/index.tsx b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/index.tsx index 27b6feb69..99cd4b9fe 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/index.tsx +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/index.tsx @@ -14,13 +14,11 @@ import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types"; import { Provider } from "react-redux"; import { ThemeConfig } from "../../types"; -import Accept from "./Accept"; import { createAuth } from "./Authorization/slice"; -import Body from "./Body"; import Curl from "./Curl"; import MethodEndpoint from "./MethodEndpoint"; -import ParamOptions from "./ParamOptions"; import { createPersistanceMiddleware } from "./persistanceMiddleware"; +import Request from "./Request"; import Response from "./Response"; import SecuritySchemes from "./SecuritySchemes"; import Server from "./Server"; @@ -95,21 +93,14 @@ function ApiDemoPanel({
- -
- - - -
+ + + -
); diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/persistanceMiddleware.ts b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/persistanceMiddleware.ts index 2486f240a..121a0613d 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/persistanceMiddleware.ts +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/persistanceMiddleware.ts @@ -19,7 +19,7 @@ export function createPersistanceMiddleware(options: ThemeConfig["api"]) { const state = storeAPI.getState(); - const storage = createStorage(options?.authPersistance); + const storage = createStorage("sessionStorage"); if (action.type === setAuthData.type) { for (const [key, value] of Object.entries(state.auth.data)) { diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/react-modal.d.ts b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/react-modal.d.ts new file mode 100644 index 000000000..88e509e0f --- /dev/null +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/react-modal.d.ts @@ -0,0 +1,8 @@ +/* ============================================================================ + * Copyright (c) Palo Alto Networks + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * ========================================================================== */ + +declare module "react-modal"; diff --git a/packages/docusaurus-theme-openapi-docs/src/theme/ApiItem/Layout/styles.module.css b/packages/docusaurus-theme-openapi-docs/src/theme/ApiItem/Layout/styles.module.css index 808662266..cc485759c 100644 --- a/packages/docusaurus-theme-openapi-docs/src/theme/ApiItem/Layout/styles.module.css +++ b/packages/docusaurus-theme-openapi-docs/src/theme/ApiItem/Layout/styles.module.css @@ -71,6 +71,62 @@ border-top: unset !important; } +:global(.theme-api-markdown .details__demo-panel) { + margin-bottom: 1rem; + background: var(--openapi-card-background-color); + border-radius: var(--openapi-card-border-radius); +} + +:global(.theme-api-markdown .details__demo-panel > summary) { + padding-left: 1rem; + padding-top: 1rem; + cursor: pointer; +} + +:global(.theme-api-markdown .details__demo-panel > div > div > pre) { + border-top-left-radius: 0; + border-top-right-radius: 0; +} + +:global(.theme-api-markdown .details__demo-panel > summary::marker) { + display: none; + content: ""; +} + +:global(.theme-api-markdown + .details__demo-panel + > summary::-webkit-details-marker) { + display: none; + content: ""; +} + +:global(.theme-api-markdown .details__demo-panel > pre) { + margin-bottom: 0; + padding-top: 0; +} + +:global(.theme-api-markdown .details__request-summary) { + display: flex; + justify-content: space-between; + align-items: center; +} + +:global(.theme-api-markdown .details__request-summary > button) { + margin-bottom: 1rem; + margin-right: 1rem; +} + +:global(.theme-api-markdown .details__response-summary) { + display: flex; + justify-content: space-between; + align-items: center; +} + +:global(.theme-api-markdown .details__response-summary > button) { + margin-bottom: 1rem; + margin-right: 1rem; +} + :global(.theme-api-markdown code) { max-width: 600px; max-height: 500px; diff --git a/yarn.lock b/yarn.lock index abeec483a..e1978b793 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7527,6 +7527,11 @@ executable@^4.1.1: dependencies: pify "^2.2.0" +exenv@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" + integrity sha512-Z+ktTxTwv9ILfgKCk32OX3n/doe+OcLTRtqK9pcL+JsP3J1/VW8Uvl4ZjLlKqeW4rzK4oesDOGMEMRIZqtP4Iw== + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -12736,7 +12741,7 @@ react-json-view@^1.21.3: react-lifecycles-compat "^3.0.4" react-textarea-autosize "^8.3.2" -react-lifecycles-compat@^3.0.4: +react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== @@ -12783,6 +12788,16 @@ react-markdown@^8.0.1: unist-util-visit "^4.0.0" vfile "^5.0.0" +react-modal@^3.15.1: + version "3.15.1" + resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.15.1.tgz#950ce67bfef80971182dd0ed38f2d9b1a681288b" + integrity sha512-duB9bxOaYg7Zt6TMFldIFxQRtSP+Dg3F1ZX3FXxSUn+3tZZ/9JCgeAQKDg7rhZSAqopq8TFRw3yIbnx77gyFTw== + dependencies: + exenv "^1.2.0" + prop-types "^15.7.2" + react-lifecycles-compat "^3.0.0" + warning "^4.0.3" + react-redux@^7.2.0: version "7.2.8" resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.8.tgz#a894068315e65de5b1b68899f9c6ee0923dd28de" @@ -15352,6 +15367,13 @@ walker@^1.0.7: dependencies: makeerror "1.0.12" +warning@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== + dependencies: + loose-envify "^1.0.0" + watchpack@^2.3.1: version "2.4.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d"