From 54fc0bcef5ebadaae8dbf629861acb802d692b69 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:29:47 -0500 Subject: [PATCH 01/20] Update navbar and add versioned config --- demo/docusaurus.config.js | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/demo/docusaurus.config.js b/demo/docusaurus.config.js index a83d7daff..d1b319dca 100644 --- a/demo/docusaurus.config.js +++ b/demo/docusaurus.config.js @@ -65,9 +65,19 @@ const config = { }, { to: "/blog", label: "Blog", position: "left" }, { + type: "dropdown", label: "API Reference", position: "left", - to: "/docs/category/petstore-api", + items: [ + { + label: "Example APIs", + to: "/docs/category/petstore-api", + }, + { + label: "Petstore (versioned)", + to: "/docs/category/petstore-versioned-api", + }, + ], }, { href: "https://github.com/PaloAltoNetworks/docusaurus-openapi-docs", @@ -133,6 +143,32 @@ const config = { { id: "openapi", config: { + petstore_versioned: { + specPath: "examples/petstore.yaml", + outputDir: "docs/petstore_versioned", // No trailing slash + sidebarOptions: { + groupPathsBy: "tag", + categoryLinkSource: "tag", + contentDocsPath: "docs", + }, + version: "2.0.0", // Current version + label: "Current", // Current version label + baseUrl: "/docs/petstore_versioned/swagger-petstore-yaml", // Leading slash is important + versions: { + "1.0.0": { + specPath: "examples/petstore-1.0.0.yaml", + outputDir: "docs/petstore_versioned/1.0.0", // No trailing slash + label: "Deprecated", + baseUrl: "/docs/petstore_versioned/1.0.0/swagger-petstore-yaml", // Leading slash is important + }, + beta: { + specPath: "examples/petstore-beta.yaml", + outputDir: "docs/petstore_versioned/beta", // No trailing slash + label: "Beta", + baseUrl: "/docs/petstore_versioned/beta/swagger-petstore-yaml", // Leading slash is important + }, + }, + }, petstore: { specPath: "examples/petstore.yaml", outputDir: "docs/petstore", From c9f17237aaba748b3eb1f39d525e445f97e11e0d Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:30:35 -0500 Subject: [PATCH 02/20] Add util for generating html version selector --- .../src/sidebars/utils.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/docusaurus-plugin-openapi-docs/src/sidebars/utils.ts diff --git a/packages/docusaurus-plugin-openapi-docs/src/sidebars/utils.ts b/packages/docusaurus-plugin-openapi-docs/src/sidebars/utils.ts new file mode 100644 index 000000000..870f196e5 --- /dev/null +++ b/packages/docusaurus-plugin-openapi-docs/src/sidebars/utils.ts @@ -0,0 +1,20 @@ +/* ============================================================================ + * 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 { render } from "mustache"; + +export default function generateDropdownHtml(versions: object[]) { + const template = ` + `; + const view = render(template, versions); + return view; +} From 3c09a528c8123b494d7a5ffacaae7bf9757367f5 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:31:04 -0500 Subject: [PATCH 03/20] Extend CLI to support versioning --- .../src/index.ts | 172 +++++++++++++++++- 1 file changed, 163 insertions(+), 9 deletions(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/index.ts b/packages/docusaurus-plugin-openapi-docs/src/index.ts index 36cec7fdc..daa769a9d 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/index.ts @@ -255,9 +255,11 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; const apiDir = path.join(siteDir, outputDir); const apiMdxFiles = await Globby(["*.api.mdx", "*.info.mdx", "*.tag.mdx"], { cwd: path.resolve(apiDir), + deep: 1, }); const sidebarFile = await Globby(["sidebar.js"], { cwd: path.resolve(apiDir), + deep: 1, }); apiMdxFiles.map((mdx) => fs.unlink(`${apiDir}/${mdx}`, (err) => { @@ -288,21 +290,66 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; ); } + async function generateVersions(versions: object, outputDir: string) { + let versionsArray = [] as object[]; + for (const [version, metadata] of Object.entries(versions)) { + versionsArray.push({ + version: version, + label: metadata.label, + baseUrl: metadata.baseUrl, + }); + } + + const versionsJson = JSON.stringify(versionsArray, null, 2); + try { + fs.writeFileSync(`${outputDir}/versions.json`, versionsJson, "utf8"); + console.log( + chalk.green(`Successfully created "${outputDir}/versions.json"`) + ); + } catch (err) { + console.error( + chalk.red(`Failed to write "${outputDir}/versions.json"`), + chalk.yellow(err) + ); + } + } + + async function cleanVersions(outputDir: string) { + if (fs.existsSync(`${outputDir}/versions.json`)) { + fs.unlink(`${outputDir}/versions.json`, (err) => { + if (err) { + console.error( + chalk.red(`Cleanup failed for "${outputDir}/versions.json"`), + chalk.yellow(err) + ); + } else { + console.log( + chalk.green(`Cleanup succeeded for "${outputDir}/versions.json"`) + ); + } + }); + } + } + return { name: `docusaurus-plugin-openapi-docs`, extendCli(cli): void { cli .command(`gen-api-docs`) - .description(`Generates API Docs mdx and sidebars.`) - .usage( - "[options] " + .description( + `Generates OpenAPI docs in MDX file format and sidebar.js (if enabled).` ) + .usage("") .arguments("") .action(async (id) => { if (id === "all") { if (config[id]) { - console.error(chalk.red("Can't use id 'all' for API Doc.")); + console.error( + chalk.red( + "Can't use id 'all' for OpenAPI docs configuration key." + ) + ); } else { Object.keys(config).forEach(async function (key) { await generateApiDocs(config[key]); @@ -310,24 +357,91 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; } } else if (!config[id]) { console.error( - chalk.red(`ID ${id} does not exist in openapi-plugin config`) + chalk.red(`ID '${id}' does not exist in OpenAPI docs config.`) ); } else { await generateApiDocs(config[id]); } }); + cli + .command(`gen-api-docs:version`) + .description( + `Generates versioned OpenAPI docs in MDX file format, versions.js and sidebar.js (if enabled).` + ) + .usage("") + .arguments("") + .action(async (id) => { + const [parentId, versionId] = id.split(":"); + const parentConfig = Object.assign({}, config[parentId]); + + const version = parentConfig.version as string; + const label = parentConfig.label as string; + const baseUrl = parentConfig.baseUrl as string; + + let parentVersion = {} as any; + parentVersion[version] = { label: label, baseUrl: baseUrl }; + + const { versions } = config[parentId] as any; + const mergedVersions = Object.assign(parentVersion, versions); + + // Prepare for merge + delete parentConfig.versions; + delete parentConfig.version; + delete parentConfig.label; + delete parentConfig.baseUrl; + + // TODO: handle when no versions are defined by version command is passed + if (versionId === "all") { + if (versions[id]) { + console.error( + chalk.red( + "Can't use id 'all' for OpenAPI docs versions configuration key." + ) + ); + } else { + await generateVersions(mergedVersions, parentConfig.outputDir); + Object.keys(versions).forEach(async (key) => { + const versionConfig = versions[key]; + const mergedConfig = { + ...parentConfig, + ...versionConfig, + }; + await generateApiDocs(mergedConfig); + }); + } + } else if (!versions[versionId]) { + console.error( + chalk.red( + `Version ID '${versionId}' does not exist in OpenAPI docs versions config.` + ) + ); + } else { + const versionConfig = versions[versionId]; + const mergedConfig = { + ...parentConfig, + ...versionConfig, + }; + await generateVersions(mergedVersions, parentConfig.outputDir); + await generateApiDocs(mergedConfig); + } + }); + cli .command(`clean-api-docs`) - .description(`Clears the Generated API Docs mdx and sidebars.`) - .usage( - "[options] " + .description( + `Clears the generated OpenAPI docs MDX files and sidebar.js (if enabled).` ) + .usage("") .arguments("") .action(async (id) => { if (id === "all") { if (config[id]) { - console.error(chalk.red("Can't use id 'all' for API Doc.")); + console.error( + chalk.red( + "Can't use id 'all' for OpenAPI docs configuration key." + ) + ); } else { Object.keys(config).forEach(async function (key) { await cleanApiDocs(config[key]); @@ -337,6 +451,46 @@ import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; await cleanApiDocs(config[id]); } }); + + cli + .command(`clean-api-docs:version`) + .description( + `Clears the versioned, generated OpenAPI docs MDX files, versions.json and sidebar.js (if enabled).` + ) + .usage("") + .arguments("") + .action(async (id) => { + const [parentId, versionId] = id.split(":"); + const { versions } = config[parentId] as any; + + const parentConfig = Object.assign({}, config[parentId]); + delete parentConfig.versions; + + if (versionId === "all") { + if (versions[id]) { + chalk.red( + "Can't use id 'all' for OpenAPI docs versions configuration key." + ); + } else { + await cleanVersions(parentConfig.outputDir); + Object.keys(versions).forEach(async (key) => { + const versionConfig = versions[key]; + const mergedConfig = { + ...parentConfig, + ...versionConfig, + }; + await cleanApiDocs(mergedConfig); + }); + } + } else { + const versionConfig = versions[versionId]; + const mergedConfig = { + ...parentConfig, + ...versionConfig, + }; + await cleanApiDocs(mergedConfig); + } + }); }, }; } From cc9f5d3a2d6b236732637f2f178ef1fda17d6f73 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:31:32 -0500 Subject: [PATCH 04/20] Fix issue preventing version badge from rendering --- packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts b/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts index c4076d765..b28a484f7 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/markdown/index.ts @@ -59,7 +59,7 @@ export function createInfoPageMD({ }: InfoPageMetadata) { return render([ `import Tabs from "@theme/Tabs";\n`, - `import TabItem from "@theme/TabItem";\n`, + `import TabItem from "@theme/TabItem";\n\n`, createVersionBadge(version), `# ${escape(title)}\n\n`, createDescription(description), From 6838c7f4424eb47d1c7674fb383fbebff1ed9b12 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:32:07 -0500 Subject: [PATCH 05/20] Add config options validation schema --- .../src/options.ts | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/docusaurus-plugin-openapi-docs/src/options.ts b/packages/docusaurus-plugin-openapi-docs/src/options.ts index 288a0a77e..e4aece901 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/options.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/options.ts @@ -26,6 +26,27 @@ export const OptionsSchema = Joi.object({ outputDir: Joi.string().required(), template: Joi.string(), sidebarOptions: sidebarOptions, + version: Joi.string().when("versions", { + is: Joi.exist(), + then: Joi.required(), + }), + label: Joi.string().when("versions", { + is: Joi.exist(), + then: Joi.required(), + }), + baseUrl: Joi.string().when("versions", { + is: Joi.exist(), + then: Joi.required(), + }), + versions: Joi.object().pattern( + /^/, + Joi.object({ + specPath: Joi.string().required(), + outputDir: Joi.string().required(), + label: Joi.string().required(), + baseUrl: Joi.string().required(), + }) + ), }) ) .required(), From 9ae50128716a959bc3fee22a96ee25c125dac737 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 18:44:46 -0500 Subject: [PATCH 06/20] Define new options types --- .../docusaurus-plugin-openapi-docs/src/types.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/docusaurus-plugin-openapi-docs/src/types.ts b/packages/docusaurus-plugin-openapi-docs/src/types.ts index e20d661d4..8ccd00c41 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/types.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/types.ts @@ -32,6 +32,19 @@ export interface APIOptions { outputDir: string; template?: string; sidebarOptions?: SidebarOptions; + version?: string; + label?: string; + baseUrl?: string; + versions?: { + [key: string]: APIVersionOptions; + }; +} + +export interface APIVersionOptions { + specPath: string; + outputDir: string; + label: string; + baseUrl: string; } export interface LoadedContent { From 83ec10d3fb2522ef8a99824c67b47bf78c26349d Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 18:48:25 -0500 Subject: [PATCH 07/20] Re-gen API docs --- .../docs/food/burgers/burger-example.info.mdx | 1 + .../frozen-yogurt-example.info.mdx | 1 + .../add-a-new-pet-to-the-store.api.mdx | 2 +- demo/docs/petstore/create-user.api.mdx | 2 +- ...st-of-users-with-given-input-array.api.mdx | 2 +- ...ist-of-users-with-given-input-list.api.mdx | 2 +- .../delete-purchase-order-by-id.api.mdx | 2 +- demo/docs/petstore/delete-user.api.mdx | 2 +- demo/docs/petstore/deletes-a-pet.api.mdx | 2 +- demo/docs/petstore/find-pet-by-id.api.mdx | 2 +- .../find-purchase-order-by-id.api.mdx | 2 +- .../petstore/finds-pets-by-status.api.mdx | 2 +- demo/docs/petstore/finds-pets-by-tags.api.mdx | 2 +- .../petstore/get-user-by-user-name.api.mdx | 2 +- ...out-current-logged-in-user-session.api.mdx | 2 +- .../logs-user-into-the-system.api.mdx | 2 +- .../petstore/place-an-order-for-a-pet.api.mdx | 2 +- .../returns-pet-inventories-by-status.api.mdx | 2 +- .../subscribe-to-the-store-events.api.mdx | 2 +- .../petstore/swagger-petstore-yaml.info.mdx | 3 +- .../petstore/update-an-existing-pet.api.mdx | 2 +- demo/docs/petstore/updated-user.api.mdx | 2 +- ...-a-pet-in-the-store-with-form-data.api.mdx | 2 +- demo/docs/petstore/uploads-an-image.api.mdx | 2 +- .../1.0.0/add-a-new-pet-to-the-store.api.mdx | 31 ++++ .../1.0.0/create-user.api.mdx | 31 ++++ ...st-of-users-with-given-input-array.api.mdx | 27 ++++ ...ist-of-users-with-given-input-list.api.mdx | 27 ++++ .../1.0.0/delete-purchase-order-by-id.api.mdx | 31 ++++ .../1.0.0/delete-user.api.mdx | 31 ++++ .../1.0.0/deletes-a-pet.api.mdx | 23 +++ .../1.0.0/find-pet-by-id.api.mdx | 47 ++++++ .../1.0.0/find-purchase-order-by-id.api.mdx | 43 +++++ .../1.0.0/finds-pets-by-status.api.mdx | 43 +++++ .../1.0.0/finds-pets-by-tags.api.mdx | 47 ++++++ .../1.0.0/get-user-by-user-name.api.mdx | 31 ++++ ...out-current-logged-in-user-session.api.mdx | 23 +++ .../1.0.0/logs-user-into-the-system.api.mdx | 27 ++++ .../docs/petstore_versioned/1.0.0/pet.tag.mdx | 19 +++ .../1.0.0/place-an-order-for-a-pet.api.mdx | 47 ++++++ .../returns-pet-inventories-by-status.api.mdx | 27 ++++ demo/docs/petstore_versioned/1.0.0/sidebar.js | 150 ++++++++++++++++++ .../petstore_versioned/1.0.0/store.tag.mdx | 19 +++ .../subscribe-to-the-store-events.api.mdx | 27 ++++ .../1.0.0/swagger-petstore-yaml.info.mdx | 64 ++++++++ .../1.0.0/update-an-existing-pet.api.mdx | 35 ++++ .../1.0.0/updated-user.api.mdx | 35 ++++ ...-a-pet-in-the-store-with-form-data.api.mdx | 23 +++ .../1.0.0/uploads-an-image.api.mdx | 23 +++ .../petstore_versioned/1.0.0/user.tag.mdx | 19 +++ .../add-a-new-pet-to-the-store.api.mdx | 31 ++++ .../beta/add-a-new-pet-to-the-store.api.mdx | 31 ++++ .../beta/create-user.api.mdx | 31 ++++ ...st-of-users-with-given-input-array.api.mdx | 27 ++++ ...ist-of-users-with-given-input-list.api.mdx | 27 ++++ .../beta/delete-purchase-order-by-id.api.mdx | 31 ++++ .../beta/delete-user.api.mdx | 31 ++++ .../beta/deletes-a-pet.api.mdx | 23 +++ .../beta/find-pet-by-id.api.mdx | 47 ++++++ .../beta/find-purchase-order-by-id.api.mdx | 43 +++++ .../beta/finds-pets-by-status.api.mdx | 43 +++++ .../beta/finds-pets-by-tags.api.mdx | 47 ++++++ .../beta/get-user-by-user-name.api.mdx | 31 ++++ ...out-current-logged-in-user-session.api.mdx | 23 +++ .../beta/logs-user-into-the-system.api.mdx | 27 ++++ demo/docs/petstore_versioned/beta/pet.tag.mdx | 19 +++ .../beta/place-an-order-for-a-pet.api.mdx | 47 ++++++ .../returns-pet-inventories-by-status.api.mdx | 27 ++++ demo/docs/petstore_versioned/beta/sidebar.js | 150 ++++++++++++++++++ .../petstore_versioned/beta/store.tag.mdx | 19 +++ .../subscribe-to-the-store-events.api.mdx | 27 ++++ .../beta/swagger-petstore-yaml.info.mdx | 64 ++++++++ .../beta/update-an-existing-pet.api.mdx | 35 ++++ .../beta/updated-user.api.mdx | 35 ++++ ...-a-pet-in-the-store-with-form-data.api.mdx | 23 +++ .../beta/uploads-an-image.api.mdx | 23 +++ .../docs/petstore_versioned/beta/user.tag.mdx | 19 +++ .../petstore_versioned/create-user.api.mdx | 31 ++++ ...st-of-users-with-given-input-array.api.mdx | 27 ++++ ...ist-of-users-with-given-input-list.api.mdx | 27 ++++ .../delete-purchase-order-by-id.api.mdx | 31 ++++ .../petstore_versioned/delete-user.api.mdx | 31 ++++ .../petstore_versioned/deletes-a-pet.api.mdx | 23 +++ .../petstore_versioned/find-pet-by-id.api.mdx | 47 ++++++ .../find-purchase-order-by-id.api.mdx | 43 +++++ .../finds-pets-by-status.api.mdx | 43 +++++ .../finds-pets-by-tags.api.mdx | 47 ++++++ .../get-user-by-user-name.api.mdx | 31 ++++ ...out-current-logged-in-user-session.api.mdx | 23 +++ .../logs-user-into-the-system.api.mdx | 27 ++++ demo/docs/petstore_versioned/pet.tag.mdx | 19 +++ .../place-an-order-for-a-pet.api.mdx | 47 ++++++ .../returns-pet-inventories-by-status.api.mdx | 27 ++++ demo/docs/petstore_versioned/sidebar.js | 150 ++++++++++++++++++ demo/docs/petstore_versioned/store.tag.mdx | 19 +++ .../subscribe-to-the-store-events.api.mdx | 27 ++++ .../swagger-petstore-yaml.info.mdx | 64 ++++++++ .../update-an-existing-pet.api.mdx | 35 ++++ .../petstore_versioned/updated-user.api.mdx | 35 ++++ ...-a-pet-in-the-store-with-form-data.api.mdx | 23 +++ .../uploads-an-image.api.mdx | 23 +++ demo/docs/petstore_versioned/user.tag.mdx | 19 +++ demo/docs/petstore_versioned/versions.json | 17 ++ 103 files changed, 2892 insertions(+), 22 deletions(-) create mode 100644 demo/docs/petstore_versioned/1.0.0/add-a-new-pet-to-the-store.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/create-user.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/creates-list-of-users-with-given-input-array.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/creates-list-of-users-with-given-input-list.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/delete-purchase-order-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/delete-user.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/deletes-a-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/find-pet-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/find-purchase-order-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/finds-pets-by-status.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/finds-pets-by-tags.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/get-user-by-user-name.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/logs-out-current-logged-in-user-session.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/logs-user-into-the-system.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/pet.tag.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/place-an-order-for-a-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/returns-pet-inventories-by-status.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/sidebar.js create mode 100644 demo/docs/petstore_versioned/1.0.0/store.tag.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/subscribe-to-the-store-events.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/swagger-petstore-yaml.info.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/update-an-existing-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/updated-user.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/updates-a-pet-in-the-store-with-form-data.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/uploads-an-image.api.mdx create mode 100644 demo/docs/petstore_versioned/1.0.0/user.tag.mdx create mode 100644 demo/docs/petstore_versioned/add-a-new-pet-to-the-store.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/add-a-new-pet-to-the-store.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/create-user.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/creates-list-of-users-with-given-input-array.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/creates-list-of-users-with-given-input-list.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/delete-purchase-order-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/delete-user.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/deletes-a-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/find-pet-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/find-purchase-order-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/finds-pets-by-status.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/finds-pets-by-tags.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/get-user-by-user-name.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/logs-out-current-logged-in-user-session.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/logs-user-into-the-system.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/pet.tag.mdx create mode 100644 demo/docs/petstore_versioned/beta/place-an-order-for-a-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/returns-pet-inventories-by-status.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/sidebar.js create mode 100644 demo/docs/petstore_versioned/beta/store.tag.mdx create mode 100644 demo/docs/petstore_versioned/beta/subscribe-to-the-store-events.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/swagger-petstore-yaml.info.mdx create mode 100644 demo/docs/petstore_versioned/beta/update-an-existing-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/updated-user.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/updates-a-pet-in-the-store-with-form-data.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/uploads-an-image.api.mdx create mode 100644 demo/docs/petstore_versioned/beta/user.tag.mdx create mode 100644 demo/docs/petstore_versioned/create-user.api.mdx create mode 100644 demo/docs/petstore_versioned/creates-list-of-users-with-given-input-array.api.mdx create mode 100644 demo/docs/petstore_versioned/creates-list-of-users-with-given-input-list.api.mdx create mode 100644 demo/docs/petstore_versioned/delete-purchase-order-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/delete-user.api.mdx create mode 100644 demo/docs/petstore_versioned/deletes-a-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/find-pet-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/find-purchase-order-by-id.api.mdx create mode 100644 demo/docs/petstore_versioned/finds-pets-by-status.api.mdx create mode 100644 demo/docs/petstore_versioned/finds-pets-by-tags.api.mdx create mode 100644 demo/docs/petstore_versioned/get-user-by-user-name.api.mdx create mode 100644 demo/docs/petstore_versioned/logs-out-current-logged-in-user-session.api.mdx create mode 100644 demo/docs/petstore_versioned/logs-user-into-the-system.api.mdx create mode 100644 demo/docs/petstore_versioned/pet.tag.mdx create mode 100644 demo/docs/petstore_versioned/place-an-order-for-a-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/returns-pet-inventories-by-status.api.mdx create mode 100644 demo/docs/petstore_versioned/sidebar.js create mode 100644 demo/docs/petstore_versioned/store.tag.mdx create mode 100644 demo/docs/petstore_versioned/subscribe-to-the-store-events.api.mdx create mode 100644 demo/docs/petstore_versioned/swagger-petstore-yaml.info.mdx create mode 100644 demo/docs/petstore_versioned/update-an-existing-pet.api.mdx create mode 100644 demo/docs/petstore_versioned/updated-user.api.mdx create mode 100644 demo/docs/petstore_versioned/updates-a-pet-in-the-store-with-form-data.api.mdx create mode 100644 demo/docs/petstore_versioned/uploads-an-image.api.mdx create mode 100644 demo/docs/petstore_versioned/user.tag.mdx create mode 100644 demo/docs/petstore_versioned/versions.json diff --git a/demo/docs/food/burgers/burger-example.info.mdx b/demo/docs/food/burgers/burger-example.info.mdx index a68d20030..f4b8b8419 100644 --- a/demo/docs/food/burgers/burger-example.info.mdx +++ b/demo/docs/food/burgers/burger-example.info.mdx @@ -7,6 +7,7 @@ hide_title: true import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; + Version: 1.0.0 # Burger Example diff --git a/demo/docs/food/yogurtstore/frozen-yogurt-example.info.mdx b/demo/docs/food/yogurtstore/frozen-yogurt-example.info.mdx index ab88fb0fc..042cbd4b0 100644 --- a/demo/docs/food/yogurtstore/frozen-yogurt-example.info.mdx +++ b/demo/docs/food/yogurtstore/frozen-yogurt-example.info.mdx @@ -7,6 +7,7 @@ hide_title: true import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; + Version: 1.0.0 # Frozen Yogurt Example diff --git a/demo/docs/petstore/add-a-new-pet-to-the-store.api.mdx b/demo/docs/petstore/add-a-new-pet-to-the-store.api.mdx index 5d99d7ae0..4a7021fa2 100644 --- a/demo/docs/petstore/add-a-new-pet-to-the-store.api.mdx +++ b/demo/docs/petstore/add-a-new-pet-to-the-store.api.mdx @@ -3,7 +3,7 @@ id: add-a-new-pet-to-the-store sidebar_label: Add a new pet to the store hide_title: true hide_table_of_contents: true -api: {"tags":["Pets"],"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"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\n","version":"1.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":["Pets"],"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"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/create-user.api.mdx b/demo/docs/petstore/create-user.api.mdx index 70664f4b1..d58c20057 100644 --- a/demo/docs/petstore/create-user.api.mdx +++ b/demo/docs/petstore/create-user.api.mdx @@ -3,7 +3,7 @@ id: create-user sidebar_label: Create user hide_title: true hide_table_of_contents: true -api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\n","version":"1.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":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/creates-list-of-users-with-given-input-array.api.mdx b/demo/docs/petstore/creates-list-of-users-with-given-input-array.api.mdx index 70731115e..89f6b6e1b 100644 --- a/demo/docs/petstore/creates-list-of-users-with-given-input-array.api.mdx +++ b/demo/docs/petstore/creates-list-of-users-with-given-input-array.api.mdx @@ -3,7 +3,7 @@ id: creates-list-of-users-with-given-input-array sidebar_label: Creates list of users with given input array hide_title: true hide_table_of_contents: true -api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\n","version":"1.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":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/creates-list-of-users-with-given-input-list.api.mdx b/demo/docs/petstore/creates-list-of-users-with-given-input-list.api.mdx index 6797ec89c..022ea7fea 100644 --- a/demo/docs/petstore/creates-list-of-users-with-given-input-list.api.mdx +++ b/demo/docs/petstore/creates-list-of-users-with-given-input-list.api.mdx @@ -3,7 +3,7 @@ id: creates-list-of-users-with-given-input-list sidebar_label: Creates list of users with given input list hide_title: true hide_table_of_contents: true -api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\n","version":"1.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":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/delete-purchase-order-by-id.api.mdx b/demo/docs/petstore/delete-purchase-order-by-id.api.mdx index 0f661f22a..1b4a27f03 100644 --- a/demo/docs/petstore/delete-purchase-order-by-id.api.mdx +++ b/demo/docs/petstore/delete-purchase-order-by-id.api.mdx @@ -3,7 +3,7 @@ id: delete-purchase-order-by-id sidebar_label: Delete purchase order by ID hide_title: true hide_table_of_contents: true -api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/delete-user.api.mdx b/demo/docs/petstore/delete-user.api.mdx index 4abbfbece..738b8c2d9 100644 --- a/demo/docs/petstore/delete-user.api.mdx +++ b/demo/docs/petstore/delete-user.api.mdx @@ -3,7 +3,7 @@ id: delete-user sidebar_label: Delete user hide_title: true hide_table_of_contents: true -api: {"tags":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/deletes-a-pet.api.mdx b/demo/docs/petstore/deletes-a-pet.api.mdx index 6d5964b44..538fdb7e6 100644 --- a/demo/docs/petstore/deletes-a-pet.api.mdx +++ b/demo/docs/petstore/deletes-a-pet.api.mdx @@ -3,7 +3,7 @@ id: deletes-a-pet sidebar_label: Deletes a pet hide_title: true hide_table_of_contents: true -api: {"tags":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/find-pet-by-id.api.mdx b/demo/docs/petstore/find-pet-by-id.api.mdx index 67d0325e4..0851d0fb2 100644 --- a/demo/docs/petstore/find-pet-by-id.api.mdx +++ b/demo/docs/petstore/find-pet-by-id.api.mdx @@ -3,7 +3,7 @@ id: find-pet-by-id sidebar_label: Find pet by ID hide_title: true hide_table_of_contents: true -api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/find-purchase-order-by-id.api.mdx b/demo/docs/petstore/find-purchase-order-by-id.api.mdx index eb4227727..65ce53245 100644 --- a/demo/docs/petstore/find-purchase-order-by-id.api.mdx +++ b/demo/docs/petstore/find-purchase-order-by-id.api.mdx @@ -3,7 +3,7 @@ id: find-purchase-order-by-id sidebar_label: Find purchase order by ID hide_title: true hide_table_of_contents: true -api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/finds-pets-by-status.api.mdx b/demo/docs/petstore/finds-pets-by-status.api.mdx index 117a563f2..8ffd4275a 100644 --- a/demo/docs/petstore/finds-pets-by-status.api.mdx +++ b/demo/docs/petstore/finds-pets-by-status.api.mdx @@ -3,7 +3,7 @@ id: finds-pets-by-status sidebar_label: Finds Pets by status hide_title: true hide_table_of_contents: true -api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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":[]}}} sidebar_class_name: "get api-method" info_path: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/finds-pets-by-tags.api.mdx b/demo/docs/petstore/finds-pets-by-tags.api.mdx index 0db9cdd65..2653d5b85 100644 --- a/demo/docs/petstore/finds-pets-by-tags.api.mdx +++ b/demo/docs/petstore/finds-pets-by-tags.api.mdx @@ -3,7 +3,7 @@ id: finds-pets-by-tags sidebar_label: Finds Pets by tags hide_title: true hide_table_of_contents: true -api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/get-user-by-user-name.api.mdx b/demo/docs/petstore/get-user-by-user-name.api.mdx index ec2ca53d1..a54fa2006 100644 --- a/demo/docs/petstore/get-user-by-user-name.api.mdx +++ b/demo/docs/petstore/get-user-by-user-name.api.mdx @@ -3,7 +3,7 @@ id: get-user-by-user-name sidebar_label: Get user by user name hide_title: true hide_table_of_contents: true -api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/logs-out-current-logged-in-user-session.api.mdx b/demo/docs/petstore/logs-out-current-logged-in-user-session.api.mdx index 9a1f2a9c4..e16ef557c 100644 --- a/demo/docs/petstore/logs-out-current-logged-in-user-session.api.mdx +++ b/demo/docs/petstore/logs-out-current-logged-in-user-session.api.mdx @@ -3,7 +3,7 @@ id: logs-out-current-logged-in-user-session sidebar_label: Logs out current logged in user session hide_title: true hide_table_of_contents: true -api: {"tags":["Users"],"description":"","operationId":"logoutUser","responses":{"default":{"description":"successful operation"}},"method":"get","path":"/user/logout","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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 out current logged in user session","description":{"content":"","type":"text/plain"},"url":{"path":["user","logout"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"method":"GET"}} +api: {"tags":["Users"],"description":"","operationId":"logoutUser","responses":{"default":{"description":"successful operation"}},"method":"get","path":"/user/logout","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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 out current logged in user session","description":{"content":"","type":"text/plain"},"url":{"path":["user","logout"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"method":"GET"}} sidebar_class_name: "get api-method" info_path: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/logs-user-into-the-system.api.mdx b/demo/docs/petstore/logs-user-into-the-system.api.mdx index 9ecdeb61d..b20f83749 100644 --- a/demo/docs/petstore/logs-user-into-the-system.api.mdx +++ b/demo/docs/petstore/logs-user-into-the-system.api.mdx @@ -3,7 +3,7 @@ id: logs-user-into-the-system sidebar_label: Logs user into the system hide_title: true hide_table_of_contents: true -api: {"tags":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/place-an-order-for-a-pet.api.mdx b/demo/docs/petstore/place-an-order-for-a-pet.api.mdx index 52a70640f..c3a21a583 100644 --- a/demo/docs/petstore/place-an-order-for-a-pet.api.mdx +++ b/demo/docs/petstore/place-an-order-for-a-pet.api.mdx @@ -3,7 +3,7 @@ id: place-an-order-for-a-pet sidebar_label: Place an order for a pet hide_title: true hide_table_of_contents: true -api: {"tags":["Petstore Orders"],"description":"","operationId":"placeOrder","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 Order","content":{"application/json":{"example":{"status":400,"message":"Invalid Order"}}}}},"requestBody":{"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"}}}},"description":"order placed for purchasing the pet","required":true},"method":"post","path":"/store/order","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"petId":{},"quantity":0,"shipDate":"string","status":"placed","complete":false,"requestId":"string"},"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\n\n","version":"1.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":"Place an order for a pet","description":{"content":"","type":"text/plain"},"url":{"path":["store","order"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["Petstore Orders"],"description":"","operationId":"placeOrder","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 Order","content":{"application/json":{"example":{"status":400,"message":"Invalid Order"}}}}},"requestBody":{"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"}}}},"description":"order placed for purchasing the pet","required":true},"method":"post","path":"/store/order","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"petId":{},"quantity":0,"shipDate":"string","status":"placed","complete":false,"requestId":"string"},"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\n\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":"Place an order for a pet","description":{"content":"","type":"text/plain"},"url":{"path":["store","order"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/returns-pet-inventories-by-status.api.mdx b/demo/docs/petstore/returns-pet-inventories-by-status.api.mdx index 24a803453..53557707f 100644 --- a/demo/docs/petstore/returns-pet-inventories-by-status.api.mdx +++ b/demo/docs/petstore/returns-pet-inventories-by-status.api.mdx @@ -3,7 +3,7 @@ id: returns-pet-inventories-by-status sidebar_label: Returns pet inventories by status hide_title: true hide_table_of_contents: true -api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/subscribe-to-the-store-events.api.mdx b/demo/docs/petstore/subscribe-to-the-store-events.api.mdx index c5c191ce6..cdbcd1d11 100644 --- a/demo/docs/petstore/subscribe-to-the-store-events.api.mdx +++ b/demo/docs/petstore/subscribe-to-the-store-events.api.mdx @@ -3,7 +3,7 @@ id: subscribe-to-the-store-events sidebar_label: Subscribe to the Store events hide_title: true hide_table_of_contents: true -api: {"tags":["Petstore Orders"],"description":"Add subscription for a store events","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackUrl":{"type":"string","format":"uri","description":"This URL will be called by the server when the desired event will occur","example":"https://myserver.com/send/callback/here"},"eventName":{"type":"string","description":"Event name for the subscription","enum":["orderInProgress","orderShipped","orderDelivered"],"example":"orderInProgress"}},"required":["callbackUrl","eventName"]}}}},"responses":{"201":{"description":"Subscription added","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string","example":"AAA-123-BBB-456"}}}}}}},"callbacks":{"orderInProgress":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"servers":[{"url":"//callback-url.path-level/v1","description":"Path level server 1"},{"url":"//callback-url.path-level/v2","description":"Path level server 2"}],"post":{"summary":"Order in Progress (Summary)","description":"A callback triggered every time an Order is updated status to \"inProgress\" (Description)","externalDocs":{"description":"Find out more","url":"https://more-details.com/demo"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}},"299":{"description":"Response for cancelling subscription"},"500":{"description":"Callback processing failed and retries will be performed"}},"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"}]},"put":{"description":"Order in Progress (Only Description)","servers":[{"url":"//callback-url.operation-level/v1","description":"Operation level server 1 (Operation override)"},{"url":"//callback-url.operation-level/v2","description":"Operation level server 2 (Operation override)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}}}}}},"orderShipped":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"post":{"description":"Very long description\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\nfugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est laborum.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"estimatedDeliveryDate":{"type":"string","format":"date-time","example":"2018-11-11T16:00:00Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}},"orderDelivered":{"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}":{"post":{"deprecated":true,"summary":"Order delivered","description":"A callback triggered every time an Order is delivered to the recipient","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}}},"method":"post","path":"/store/subscribe","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"callbackUrl":"https://myserver.com/send/callback/here","eventName":"orderInProgress"},"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\n\n","version":"1.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":"Subscribe to the Store events","description":{"content":"Add subscription for a store events","type":"text/plain"},"url":{"path":["store","subscribe"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["Petstore Orders"],"description":"Add subscription for a store events","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackUrl":{"type":"string","format":"uri","description":"This URL will be called by the server when the desired event will occur","example":"https://myserver.com/send/callback/here"},"eventName":{"type":"string","description":"Event name for the subscription","enum":["orderInProgress","orderShipped","orderDelivered"],"example":"orderInProgress"}},"required":["callbackUrl","eventName"]}}}},"responses":{"201":{"description":"Subscription added","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string","example":"AAA-123-BBB-456"}}}}}}},"callbacks":{"orderInProgress":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"servers":[{"url":"//callback-url.path-level/v1","description":"Path level server 1"},{"url":"//callback-url.path-level/v2","description":"Path level server 2"}],"post":{"summary":"Order in Progress (Summary)","description":"A callback triggered every time an Order is updated status to \"inProgress\" (Description)","externalDocs":{"description":"Find out more","url":"https://more-details.com/demo"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}},"299":{"description":"Response for cancelling subscription"},"500":{"description":"Callback processing failed and retries will be performed"}},"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"}]},"put":{"description":"Order in Progress (Only Description)","servers":[{"url":"//callback-url.operation-level/v1","description":"Operation level server 1 (Operation override)"},{"url":"//callback-url.operation-level/v2","description":"Operation level server 2 (Operation override)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}}}}}},"orderShipped":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"post":{"description":"Very long description\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\nfugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est laborum.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"estimatedDeliveryDate":{"type":"string","format":"date-time","example":"2018-11-11T16:00:00Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}},"orderDelivered":{"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}":{"post":{"deprecated":true,"summary":"Order delivered","description":"A callback triggered every time an Order is delivered to the recipient","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}}},"method":"post","path":"/store/subscribe","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"callbackUrl":"https://myserver.com/send/callback/here","eventName":"orderInProgress"},"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\n\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":"Subscribe to the Store events","description":{"content":"Add subscription for a store events","type":"text/plain"},"url":{"path":["store","subscribe"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "post api-method" info_path: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/swagger-petstore-yaml.info.mdx b/demo/docs/petstore/swagger-petstore-yaml.info.mdx index bad7a4890..44d06fe3f 100644 --- a/demo/docs/petstore/swagger-petstore-yaml.info.mdx +++ b/demo/docs/petstore/swagger-petstore-yaml.info.mdx @@ -7,7 +7,8 @@ hide_title: true import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; -Version: 1.0.0 + +Version: 2.0.0 # Swagger Petstore YAML diff --git a/demo/docs/petstore/update-an-existing-pet.api.mdx b/demo/docs/petstore/update-an-existing-pet.api.mdx index 3c6198f3c..d3dc08430 100644 --- a/demo/docs/petstore/update-an-existing-pet.api.mdx +++ b/demo/docs/petstore/update-an-existing-pet.api.mdx @@ -3,7 +3,7 @@ id: update-an-existing-pet sidebar_label: Update an existing pet hide_title: true hide_table_of_contents: true -api: {"tags":["Pets"],"description":"","operationId":"updatePet","responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"put","path":"/pet","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\n","version":"1.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":"Update an existing pet","description":{"content":"","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":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["Pets"],"description":"","operationId":"updatePet","responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"put","path":"/pet","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\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":"Update an existing pet","description":{"content":"","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":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "put api-method" info_path: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/updated-user.api.mdx b/demo/docs/petstore/updated-user.api.mdx index 9bcb01580..1a3477891 100644 --- a/demo/docs/petstore/updated-user.api.mdx +++ b/demo/docs/petstore/updated-user.api.mdx @@ -3,7 +3,7 @@ id: updated-user sidebar_label: Updated user hide_title: true hide_table_of_contents: true -api: {"tags":["Users"],"description":"This can only be done by the logged in user.","operationId":"updateUser","parameters":[{"name":"username","in":"path","description":"name that need to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"Updated user object","required":true},"method":"put","path":"/user/{username}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\n","version":"1.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":"Updated 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) name that need to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["Users"],"description":"This can only be done by the logged in user.","operationId":"updateUser","parameters":[{"name":"username","in":"path","description":"name that need to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"Updated user object","required":true},"method":"put","path":"/user/{username}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\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":"Updated 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) name that need to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "put api-method" info_path: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/updates-a-pet-in-the-store-with-form-data.api.mdx b/demo/docs/petstore/updates-a-pet-in-the-store-with-form-data.api.mdx index 9984291d2..cec98f489 100644 --- a/demo/docs/petstore/updates-a-pet-in-the-store-with-form-data.api.mdx +++ b/demo/docs/petstore/updates-a-pet-in-the-store-with-form-data.api.mdx @@ -3,7 +3,7 @@ id: updates-a-pet-in-the-store-with-form-data sidebar_label: Updates a pet in the store with form data hide_title: true hide_table_of_contents: true -api: {"tags":["Pets"],"description":"","operationId":"updatePetWithForm","parameters":[{"name":"petId","in":"path","description":"ID of pet that needs to be updated","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}}}}}},"method":"post","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":"Updates a pet in the store with form data","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be updated","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"method":"POST","body":{"mode":"urlencoded","urlencoded":[]},"auth":{"type":"oauth2","oauth2":[]}}} +api: {"tags":["Pets"],"description":"","operationId":"updatePetWithForm","parameters":[{"name":"petId","in":"path","description":"ID of pet that needs to be updated","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}}}}}},"method":"post","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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":"Updates a pet in the store with form data","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be updated","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"method":"POST","body":{"mode":"urlencoded","urlencoded":[]},"auth":{"type":"oauth2","oauth2":[]}}} sidebar_class_name: "post api-method" info_path: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore/uploads-an-image.api.mdx b/demo/docs/petstore/uploads-an-image.api.mdx index 5fb62dd21..d60570234 100644 --- a/demo/docs/petstore/uploads-an-image.api.mdx +++ b/demo/docs/petstore/uploads-an-image.api.mdx @@ -3,7 +3,7 @@ id: uploads-an-image sidebar_label: uploads an image hide_title: true hide_table_of_contents: true -api: {"tags":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore/swagger-petstore-yaml --- diff --git a/demo/docs/petstore_versioned/1.0.0/add-a-new-pet-to-the-store.api.mdx b/demo/docs/petstore_versioned/1.0.0/add-a-new-pet-to-the-store.api.mdx new file mode 100644 index 000000000..a021fafb7 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/add-a-new-pet-to-the-store.api.mdx @@ -0,0 +1,31 @@ +--- +id: add-a-new-pet-to-the-store +sidebar_label: Add a new pet to the store +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Add a new pet to the store + + + +Add new pet to the store inventory. + +
Request Body required
+ +Pet object that needs to be added to the store + +
+ +Invalid input + +
+ \ No newline at end of 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 new file mode 100644 index 000000000..2bb95db92 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/create-user.api.mdx @@ -0,0 +1,31 @@ +--- +id: create-user +sidebar_label: Create user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Create user + + + +This can only be done by the logged in user. + +
Request Body required
+ +Created user object + +
+ +successful operation + +
+ \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/creates-list-of-users-with-given-input-array.api.mdx b/demo/docs/petstore_versioned/1.0.0/creates-list-of-users-with-given-input-array.api.mdx new file mode 100644 index 000000000..82e13419c --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/creates-list-of-users-with-given-input-array.api.mdx @@ -0,0 +1,27 @@ +--- +id: creates-list-of-users-with-given-input-array +sidebar_label: Creates list of users with given input array +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Creates list of users with given input array + +
Request Body required
+ +List of user object + +
+ +successful operation + +
+ \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/creates-list-of-users-with-given-input-list.api.mdx b/demo/docs/petstore_versioned/1.0.0/creates-list-of-users-with-given-input-list.api.mdx new file mode 100644 index 000000000..0595213fb --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/creates-list-of-users-with-given-input-list.api.mdx @@ -0,0 +1,27 @@ +--- +id: creates-list-of-users-with-given-input-list +sidebar_label: Creates list of users with given input list +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Creates list of users with given input list + +
Request Body required
+ +List of user object + +
+ +successful operation + +
+ \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/delete-purchase-order-by-id.api.mdx b/demo/docs/petstore_versioned/1.0.0/delete-purchase-order-by-id.api.mdx new file mode 100644 index 000000000..99143bf80 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/delete-purchase-order-by-id.api.mdx @@ -0,0 +1,31 @@ +--- +id: delete-purchase-order-by-id +sidebar_label: Delete purchase order by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Delete purchase order by ID + + + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +
Path Parameters
+ +Invalid ID supplied + +
+ +Order not found + +
+ \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/delete-user.api.mdx b/demo/docs/petstore_versioned/1.0.0/delete-user.api.mdx new file mode 100644 index 000000000..744fb7231 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/delete-user.api.mdx @@ -0,0 +1,31 @@ +--- +id: delete-user +sidebar_label: Delete user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Delete user + + + +This can only be done by the logged in user. + +
Path Parameters
+ +Invalid username supplied + +
+ +User not found + +
+ \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/deletes-a-pet.api.mdx b/demo/docs/petstore_versioned/1.0.0/deletes-a-pet.api.mdx new file mode 100644 index 000000000..5b4017f2f --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/deletes-a-pet.api.mdx @@ -0,0 +1,23 @@ +--- +id: deletes-a-pet +sidebar_label: Deletes a pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Deletes a pet + +
Path Parameters
Header Parameters
    "}}>
+ +Invalid pet value + +
+ \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/find-pet-by-id.api.mdx b/demo/docs/petstore_versioned/1.0.0/find-pet-by-id.api.mdx new file mode 100644 index 000000000..2dc9ad2ef --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/find-pet-by-id.api.mdx @@ -0,0 +1,47 @@ +--- +id: find-pet-by-id +sidebar_label: Find pet by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Find pet by ID + + + +Returns a single pet + +
Path Parameters
+ +successful operation + +
Schema
    id object
    + +Pet ID + +
    allOf
      category object
      + +Categories this pet belongs to + +
      allOf
        sub object
        + +Test Sub Category + +
      friend object
      allOf
      + +Invalid ID supplied + +
      + +Pet not found + +
      + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/find-purchase-order-by-id.api.mdx b/demo/docs/petstore_versioned/1.0.0/find-purchase-order-by-id.api.mdx new file mode 100644 index 000000000..bcd65365c --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/find-purchase-order-by-id.api.mdx @@ -0,0 +1,43 @@ +--- +id: find-purchase-order-by-id +sidebar_label: Find purchase order by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Find purchase order by ID + + + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +
      Path Parameters
      + +successful operation + +
      Schema
        id object
        + +Order ID + +
        allOf
          petId object
          + +Pet ID + +
          allOf
          + +Invalid ID supplied + +
          + +Order not found + +
          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/finds-pets-by-status.api.mdx b/demo/docs/petstore_versioned/1.0.0/finds-pets-by-status.api.mdx new file mode 100644 index 000000000..e78bb3a12 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/finds-pets-by-status.api.mdx @@ -0,0 +1,43 @@ +--- +id: finds-pets-by-status +sidebar_label: Finds Pets by status +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":[]}}} +sidebar_class_name: "get api-method" +info_path: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Finds Pets by status + + + +Multiple status values can be provided with comma separated strings + +
          Query Parameters
          + +successful operation + +
          Schema
            • id object
              + +Pet ID + +
              allOf
                category object
                + +Categories this pet belongs to + +
                allOf
                  sub object
                  + +Test Sub Category + +
                friend object
                allOf
              + +Invalid status value + +
              + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/finds-pets-by-tags.api.mdx b/demo/docs/petstore_versioned/1.0.0/finds-pets-by-tags.api.mdx new file mode 100644 index 000000000..5b186b3a4 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/finds-pets-by-tags.api.mdx @@ -0,0 +1,47 @@ +--- +id: finds-pets-by-tags +sidebar_label: Finds Pets by tags +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Finds Pets by tags + +:::caution deprecated + +This endpoint has been deprecated and may be removed in future versions of the API. + +::: + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +
              Query Parameters
              + +successful operation + +
              Schema
                • id object
                  + +Pet ID + +
                  allOf
                    category object
                    + +Categories this pet belongs to + +
                    allOf
                      sub object
                      + +Test Sub Category + +
                    friend object
                    allOf
                  + +Invalid tag value + +
                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/get-user-by-user-name.api.mdx b/demo/docs/petstore_versioned/1.0.0/get-user-by-user-name.api.mdx new file mode 100644 index 000000000..e913d8f19 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/get-user-by-user-name.api.mdx @@ -0,0 +1,31 @@ +--- +id: get-user-by-user-name +sidebar_label: Get user by user name +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Get user by user name + +
                  Path Parameters
                  + +successful operation + +
                  Schema
                  + +Invalid username supplied + +
                  + +User not found + +
                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/logs-out-current-logged-in-user-session.api.mdx b/demo/docs/petstore_versioned/1.0.0/logs-out-current-logged-in-user-session.api.mdx new file mode 100644 index 000000000..0cfd24a2e --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/logs-out-current-logged-in-user-session.api.mdx @@ -0,0 +1,23 @@ +--- +id: logs-out-current-logged-in-user-session +sidebar_label: Logs out current logged in user session +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"description":"","operationId":"logoutUser","responses":{"default":{"description":"successful operation"}},"method":"get","path":"/user/logout","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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 out current logged in user session","description":{"content":"","type":"text/plain"},"url":{"path":["user","logout"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Logs out current logged in user session + +
                  + +successful operation + +
                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/logs-user-into-the-system.api.mdx b/demo/docs/petstore_versioned/1.0.0/logs-user-into-the-system.api.mdx new file mode 100644 index 000000000..816203b1d --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/logs-user-into-the-system.api.mdx @@ -0,0 +1,27 @@ +--- +id: logs-user-into-the-system +sidebar_label: Logs user into the system +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Logs user into the system + +
                  Query Parameters
                  + +successful operation + +
                  Schema
                  • string
                  + +Invalid username/password supplied + +
                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/pet.tag.mdx b/demo/docs/petstore_versioned/1.0.0/pet.tag.mdx new file mode 100644 index 000000000..6f8c88d4e --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/pet.tag.mdx @@ -0,0 +1,19 @@ +--- +id: pet +title: Pets +description: Pets +--- + + + +Everything about your Pets + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/place-an-order-for-a-pet.api.mdx b/demo/docs/petstore_versioned/1.0.0/place-an-order-for-a-pet.api.mdx new file mode 100644 index 000000000..2a2f8bd4f --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/place-an-order-for-a-pet.api.mdx @@ -0,0 +1,47 @@ +--- +id: place-an-order-for-a-pet +sidebar_label: Place an order for a pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"description":"","operationId":"placeOrder","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 Order","content":{"application/json":{"example":{"status":400,"message":"Invalid Order"}}}}},"requestBody":{"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"}}}},"description":"order placed for purchasing the pet","required":true},"method":"post","path":"/store/order","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"petId":{},"quantity":0,"shipDate":"string","status":"placed","complete":false,"requestId":"string"},"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\n\n","version":"1.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":"Place an order for a pet","description":{"content":"","type":"text/plain"},"url":{"path":["store","order"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Place an order for a pet + +
                  Request Body required
                  + +order placed for purchasing the pet + +
                    id object
                    + +Order ID + +
                    allOf
                      petId object
                      + +Pet ID + +
                      allOf
                      + +successful operation + +
                      Schema
                        id object
                        + +Order ID + +
                        allOf
                          petId object
                          + +Pet ID + +
                          allOf
                          + +Invalid Order + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/returns-pet-inventories-by-status.api.mdx b/demo/docs/petstore_versioned/1.0.0/returns-pet-inventories-by-status.api.mdx new file mode 100644 index 000000000..636a94393 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/returns-pet-inventories-by-status.api.mdx @@ -0,0 +1,27 @@ +--- +id: returns-pet-inventories-by-status +sidebar_label: Returns pet inventories by status +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Returns pet inventories by status + + + +Returns a map of status codes to quantities + +
                          + +successful operation + +
                          Schema
                          • object
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/sidebar.js b/demo/docs/petstore_versioned/1.0.0/sidebar.js new file mode 100644 index 000000000..c288328f9 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/sidebar.js @@ -0,0 +1,150 @@ +module.exports = [ + { type: "doc", id: "petstore_versioned/1.0.0/swagger-petstore-yaml" }, + { + type: "category", + label: "Pets", + link: { type: "doc", id: "petstore_versioned/1.0.0/pet" }, + items: [ + { + type: "doc", + id: "petstore_versioned/1.0.0/add-a-new-pet-to-the-store", + label: "Add a new pet to the store", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/update-an-existing-pet", + label: "Update an existing pet", + className: "api-method put", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/find-pet-by-id", + label: "Find pet by ID", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/updates-a-pet-in-the-store-with-form-data", + label: "Updates a pet in the store with form data", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/deletes-a-pet", + label: "Deletes a pet", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/uploads-an-image", + label: "uploads an image", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/finds-pets-by-status", + label: "Finds Pets by status", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/finds-pets-by-tags", + label: "Finds Pets by tags", + className: "menu__list-item--deprecated api-method get", + }, + ], + }, + { + type: "category", + label: "Petstore Orders", + link: { type: "doc", id: "petstore_versioned/1.0.0/store" }, + items: [ + { + type: "doc", + id: "petstore_versioned/1.0.0/returns-pet-inventories-by-status", + label: "Returns pet inventories by status", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/place-an-order-for-a-pet", + label: "Place an order for a pet", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/find-purchase-order-by-id", + label: "Find purchase order by ID", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/delete-purchase-order-by-id", + label: "Delete purchase order by ID", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/subscribe-to-the-store-events", + label: "Subscribe to the Store events", + className: "api-method post", + }, + ], + }, + { + type: "category", + label: "Users", + link: { type: "doc", id: "petstore_versioned/1.0.0/user" }, + items: [ + { + type: "doc", + id: "petstore_versioned/1.0.0/create-user", + label: "Create user", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/get-user-by-user-name", + label: "Get user by user name", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/updated-user", + label: "Updated user", + className: "api-method put", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/delete-user", + label: "Delete user", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/creates-list-of-users-with-given-input-array", + label: "Creates list of users with given input array", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/creates-list-of-users-with-given-input-list", + label: "Creates list of users with given input list", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/logs-user-into-the-system", + label: "Logs user into the system", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/1.0.0/logs-out-current-logged-in-user-session", + label: "Logs out current logged in user session", + className: "api-method get", + }, + ], + }, +]; diff --git a/demo/docs/petstore_versioned/1.0.0/store.tag.mdx b/demo/docs/petstore_versioned/1.0.0/store.tag.mdx new file mode 100644 index 000000000..4babae439 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/store.tag.mdx @@ -0,0 +1,19 @@ +--- +id: store +title: Petstore Orders +description: Petstore Orders +--- + + + +Access to Petstore orders + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/subscribe-to-the-store-events.api.mdx b/demo/docs/petstore_versioned/1.0.0/subscribe-to-the-store-events.api.mdx new file mode 100644 index 000000000..5560d71e4 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/subscribe-to-the-store-events.api.mdx @@ -0,0 +1,27 @@ +--- +id: subscribe-to-the-store-events +sidebar_label: Subscribe to the Store events +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"description":"Add subscription for a store events","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackUrl":{"type":"string","format":"uri","description":"This URL will be called by the server when the desired event will occur","example":"https://myserver.com/send/callback/here"},"eventName":{"type":"string","description":"Event name for the subscription","enum":["orderInProgress","orderShipped","orderDelivered"],"example":"orderInProgress"}},"required":["callbackUrl","eventName"]}}}},"responses":{"201":{"description":"Subscription added","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string","example":"AAA-123-BBB-456"}}}}}}},"callbacks":{"orderInProgress":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"servers":[{"url":"//callback-url.path-level/v1","description":"Path level server 1"},{"url":"//callback-url.path-level/v2","description":"Path level server 2"}],"post":{"summary":"Order in Progress (Summary)","description":"A callback triggered every time an Order is updated status to \"inProgress\" (Description)","externalDocs":{"description":"Find out more","url":"https://more-details.com/demo"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}},"299":{"description":"Response for cancelling subscription"},"500":{"description":"Callback processing failed and retries will be performed"}},"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"}]},"put":{"description":"Order in Progress (Only Description)","servers":[{"url":"//callback-url.operation-level/v1","description":"Operation level server 1 (Operation override)"},{"url":"//callback-url.operation-level/v2","description":"Operation level server 2 (Operation override)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}}}}}},"orderShipped":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"post":{"description":"Very long description\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\nfugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est laborum.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"estimatedDeliveryDate":{"type":"string","format":"date-time","example":"2018-11-11T16:00:00Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}},"orderDelivered":{"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}":{"post":{"deprecated":true,"summary":"Order delivered","description":"A callback triggered every time an Order is delivered to the recipient","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}}},"method":"post","path":"/store/subscribe","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"callbackUrl":"https://myserver.com/send/callback/here","eventName":"orderInProgress"},"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\n\n","version":"1.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":"Subscribe to the Store events","description":{"content":"Add subscription for a store events","type":"text/plain"},"url":{"path":["store","subscribe"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Subscribe to the Store events + + + +Add subscription for a store events + +
                          Request Body
                          + +Subscription added + +
                          Schema
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/swagger-petstore-yaml.info.mdx b/demo/docs/petstore_versioned/1.0.0/swagger-petstore-yaml.info.mdx new file mode 100644 index 000000000..ce759e56d --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/swagger-petstore-yaml.info.mdx @@ -0,0 +1,64 @@ +--- +id: swagger-petstore-yaml +sidebar_label: Introduction +sidebar_position: 0 +hide_title: true +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Version: 1.0.0 + +# Swagger Petstore YAML + + + +This is a sample server Petstore server. +You can find out more about Swagger at +[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). +For this sample, you can use the api key `special-key` to test the authorization filters. + +## Introduction +This API is documented in **OpenAPI format** and is based on +[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. +It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) +tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + +## OpenAPI Specification +This API is documented in **OpenAPI format** and is based on +[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. +It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) +tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + +## Cross-Origin Resource Sharing +This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). +And that allows cross-domain communication from the browser. +All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. + +## Authentication + +Petstore offers two forms of authentication: + - API Key + - OAuth2 +OAuth2 - an open protocol to allow secure authorization in a simple +and standard method from web, mobile and desktop applications. + + + + +

                          Authentication

                          + +Get access to data while protecting your account credentials. +OAuth2 is also a safer and more secure way to give you access. + + +
                          Security Scheme Type:oauth2
                          implicit OAuth Flow:

                          Authorization URL: http://petstore.swagger.io/api/oauth/dialog

                          Scopes:
                          • write:pets: modify pets in your account
                          • read:pets: read your pets
                          + +For this sample, you can use the api key `special-key` to test the authorization filters. + + +
                          Security Scheme Type:apiKey
                          Header parameter name:api_key

                          Terms of Service

                          http://swagger.io/terms/

                          License

                          Apache 2.0
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/update-an-existing-pet.api.mdx b/demo/docs/petstore_versioned/1.0.0/update-an-existing-pet.api.mdx new file mode 100644 index 000000000..5b8dc7964 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/update-an-existing-pet.api.mdx @@ -0,0 +1,35 @@ +--- +id: update-an-existing-pet +sidebar_label: Update an existing pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"description":"","operationId":"updatePet","responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"put","path":"/pet","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\n","version":"1.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":"Update an existing pet","description":{"content":"","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":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +sidebar_class_name: "put api-method" +info_path: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Update an existing pet + +
                          Request Body required
                          + +Pet object that needs to be added to the store + +
                          + +Invalid ID supplied + +
                          + +Pet not found + +
                          + +Validation exception + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/updated-user.api.mdx b/demo/docs/petstore_versioned/1.0.0/updated-user.api.mdx new file mode 100644 index 000000000..5b9923389 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/updated-user.api.mdx @@ -0,0 +1,35 @@ +--- +id: updated-user +sidebar_label: Updated user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"description":"This can only be done by the logged in user.","operationId":"updateUser","parameters":[{"name":"username","in":"path","description":"name that need to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"Updated user object","required":true},"method":"put","path":"/user/{username}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\n","version":"1.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":"Updated 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) name that need to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "put api-method" +info_path: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Updated user + + + +This can only be done by the logged in user. + +
                          Path Parameters
                          Request Body required
                          + +Updated user object + +
                          + +Invalid user supplied + +
                          + +User not found + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/updates-a-pet-in-the-store-with-form-data.api.mdx b/demo/docs/petstore_versioned/1.0.0/updates-a-pet-in-the-store-with-form-data.api.mdx new file mode 100644 index 000000000..89cb6821d --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/updates-a-pet-in-the-store-with-form-data.api.mdx @@ -0,0 +1,23 @@ +--- +id: updates-a-pet-in-the-store-with-form-data +sidebar_label: Updates a pet in the store with form data +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"description":"","operationId":"updatePetWithForm","parameters":[{"name":"petId","in":"path","description":"ID of pet that needs to be updated","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}}}}}},"method":"post","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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":"Updates a pet in the store with form data","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be updated","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"method":"POST","body":{"mode":"urlencoded","urlencoded":[]},"auth":{"type":"oauth2","oauth2":[]}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Updates a pet in the store with form data + +
                          Path Parameters
                          Request Body
                          + +Invalid input + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/uploads-an-image.api.mdx b/demo/docs/petstore_versioned/1.0.0/uploads-an-image.api.mdx new file mode 100644 index 000000000..939bc72c4 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/uploads-an-image.api.mdx @@ -0,0 +1,23 @@ +--- +id: uploads-an-image +sidebar_label: uploads an image +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"1.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: docs/petstore_versioned/1.0.0/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## uploads an image + +
                          Path Parameters
                          Request Body
                          • string
                          + +successful operation + +
                          Schema
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/1.0.0/user.tag.mdx b/demo/docs/petstore_versioned/1.0.0/user.tag.mdx new file mode 100644 index 000000000..2d819fac2 --- /dev/null +++ b/demo/docs/petstore_versioned/1.0.0/user.tag.mdx @@ -0,0 +1,19 @@ +--- +id: user +title: Users +description: Users +--- + + + +Operations about user + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/add-a-new-pet-to-the-store.api.mdx b/demo/docs/petstore_versioned/add-a-new-pet-to-the-store.api.mdx new file mode 100644 index 000000000..23265b7f1 --- /dev/null +++ b/demo/docs/petstore_versioned/add-a-new-pet-to-the-store.api.mdx @@ -0,0 +1,31 @@ +--- +id: add-a-new-pet-to-the-store +sidebar_label: Add a new pet to the store +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Add a new pet to the store + + + +Add new pet to the store inventory. + +
                          Request Body required
                          + +Pet object that needs to be added to the store + +
                          + +Invalid input + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/add-a-new-pet-to-the-store.api.mdx b/demo/docs/petstore_versioned/beta/add-a-new-pet-to-the-store.api.mdx new file mode 100644 index 000000000..df72ff759 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/add-a-new-pet-to-the-store.api.mdx @@ -0,0 +1,31 @@ +--- +id: add-a-new-pet-to-the-store +sidebar_label: Add a new pet to the store +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Add a new pet to the store + + + +Add new pet to the store inventory. + +
                          Request Body required
                          + +Pet object that needs to be added to the store + +
                          + +Invalid input + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/create-user.api.mdx b/demo/docs/petstore_versioned/beta/create-user.api.mdx new file mode 100644 index 000000000..252c9bde2 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/create-user.api.mdx @@ -0,0 +1,31 @@ +--- +id: create-user +sidebar_label: Create user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Create user + + + +This can only be done by the logged in user. + +
                          Request Body required
                          + +Created user object + +
                          + +successful operation + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/creates-list-of-users-with-given-input-array.api.mdx b/demo/docs/petstore_versioned/beta/creates-list-of-users-with-given-input-array.api.mdx new file mode 100644 index 000000000..39abe36dd --- /dev/null +++ b/demo/docs/petstore_versioned/beta/creates-list-of-users-with-given-input-array.api.mdx @@ -0,0 +1,27 @@ +--- +id: creates-list-of-users-with-given-input-array +sidebar_label: Creates list of users with given input array +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Creates list of users with given input array + +
                          Request Body required
                          + +List of user object + +
                          + +successful operation + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/creates-list-of-users-with-given-input-list.api.mdx b/demo/docs/petstore_versioned/beta/creates-list-of-users-with-given-input-list.api.mdx new file mode 100644 index 000000000..4bb5b0c59 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/creates-list-of-users-with-given-input-list.api.mdx @@ -0,0 +1,27 @@ +--- +id: creates-list-of-users-with-given-input-list +sidebar_label: Creates list of users with given input list +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Creates list of users with given input list + +
                          Request Body required
                          + +List of user object + +
                          + +successful operation + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/delete-purchase-order-by-id.api.mdx b/demo/docs/petstore_versioned/beta/delete-purchase-order-by-id.api.mdx new file mode 100644 index 000000000..6a322e170 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/delete-purchase-order-by-id.api.mdx @@ -0,0 +1,31 @@ +--- +id: delete-purchase-order-by-id +sidebar_label: Delete purchase order by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Delete purchase order by ID + + + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +
                          Path Parameters
                          + +Invalid ID supplied + +
                          + +Order not found + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/delete-user.api.mdx b/demo/docs/petstore_versioned/beta/delete-user.api.mdx new file mode 100644 index 000000000..33e8a6207 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/delete-user.api.mdx @@ -0,0 +1,31 @@ +--- +id: delete-user +sidebar_label: Delete user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Delete user + + + +This can only be done by the logged in user. + +
                          Path Parameters
                          + +Invalid username supplied + +
                          + +User not found + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/deletes-a-pet.api.mdx b/demo/docs/petstore_versioned/beta/deletes-a-pet.api.mdx new file mode 100644 index 000000000..58b499d0e --- /dev/null +++ b/demo/docs/petstore_versioned/beta/deletes-a-pet.api.mdx @@ -0,0 +1,23 @@ +--- +id: deletes-a-pet +sidebar_label: Deletes a pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Deletes a pet + +
                          Path Parameters
                          Header Parameters
                            "}}>
                          + +Invalid pet value + +
                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/find-pet-by-id.api.mdx b/demo/docs/petstore_versioned/beta/find-pet-by-id.api.mdx new file mode 100644 index 000000000..9f11472c0 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/find-pet-by-id.api.mdx @@ -0,0 +1,47 @@ +--- +id: find-pet-by-id +sidebar_label: Find pet by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Find pet by ID + + + +Returns a single pet + +
                          Path Parameters
                          + +successful operation + +
                          Schema
                            id object
                            + +Pet ID + +
                            allOf
                              category object
                              + +Categories this pet belongs to + +
                              allOf
                                sub object
                                + +Test Sub Category + +
                              friend object
                              allOf
                              + +Invalid ID supplied + +
                              + +Pet not found + +
                              + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/find-purchase-order-by-id.api.mdx b/demo/docs/petstore_versioned/beta/find-purchase-order-by-id.api.mdx new file mode 100644 index 000000000..2c32cd4f5 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/find-purchase-order-by-id.api.mdx @@ -0,0 +1,43 @@ +--- +id: find-purchase-order-by-id +sidebar_label: Find purchase order by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Find purchase order by ID + + + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +
                              Path Parameters
                              + +successful operation + +
                              Schema
                                id object
                                + +Order ID + +
                                allOf
                                  petId object
                                  + +Pet ID + +
                                  allOf
                                  + +Invalid ID supplied + +
                                  + +Order not found + +
                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/finds-pets-by-status.api.mdx b/demo/docs/petstore_versioned/beta/finds-pets-by-status.api.mdx new file mode 100644 index 000000000..5cb4d7113 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/finds-pets-by-status.api.mdx @@ -0,0 +1,43 @@ +--- +id: finds-pets-by-status +sidebar_label: Finds Pets by status +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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":[]}}} +sidebar_class_name: "get api-method" +info_path: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Finds Pets by status + + + +Multiple status values can be provided with comma separated strings + +
                                  Query Parameters
                                  + +successful operation + +
                                  Schema
                                    • id object
                                      + +Pet ID + +
                                      allOf
                                        category object
                                        + +Categories this pet belongs to + +
                                        allOf
                                          sub object
                                          + +Test Sub Category + +
                                        friend object
                                        allOf
                                      + +Invalid status value + +
                                      + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/finds-pets-by-tags.api.mdx b/demo/docs/petstore_versioned/beta/finds-pets-by-tags.api.mdx new file mode 100644 index 000000000..c515549c3 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/finds-pets-by-tags.api.mdx @@ -0,0 +1,47 @@ +--- +id: finds-pets-by-tags +sidebar_label: Finds Pets by tags +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Finds Pets by tags + +:::caution deprecated + +This endpoint has been deprecated and may be removed in future versions of the API. + +::: + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +
                                      Query Parameters
                                      + +successful operation + +
                                      Schema
                                        • id object
                                          + +Pet ID + +
                                          allOf
                                            category object
                                            + +Categories this pet belongs to + +
                                            allOf
                                              sub object
                                              + +Test Sub Category + +
                                            friend object
                                            allOf
                                          + +Invalid tag value + +
                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/get-user-by-user-name.api.mdx b/demo/docs/petstore_versioned/beta/get-user-by-user-name.api.mdx new file mode 100644 index 000000000..8652cfcd7 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/get-user-by-user-name.api.mdx @@ -0,0 +1,31 @@ +--- +id: get-user-by-user-name +sidebar_label: Get user by user name +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Get user by user name + +
                                          Path Parameters
                                          + +successful operation + +
                                          Schema
                                          + +Invalid username supplied + +
                                          + +User not found + +
                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/logs-out-current-logged-in-user-session.api.mdx b/demo/docs/petstore_versioned/beta/logs-out-current-logged-in-user-session.api.mdx new file mode 100644 index 000000000..74d11790c --- /dev/null +++ b/demo/docs/petstore_versioned/beta/logs-out-current-logged-in-user-session.api.mdx @@ -0,0 +1,23 @@ +--- +id: logs-out-current-logged-in-user-session +sidebar_label: Logs out current logged in user session +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"description":"","operationId":"logoutUser","responses":{"default":{"description":"successful operation"}},"method":"get","path":"/user/logout","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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 out current logged in user session","description":{"content":"","type":"text/plain"},"url":{"path":["user","logout"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Logs out current logged in user session + +
                                          + +successful operation + +
                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/logs-user-into-the-system.api.mdx b/demo/docs/petstore_versioned/beta/logs-user-into-the-system.api.mdx new file mode 100644 index 000000000..ea91ffa17 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/logs-user-into-the-system.api.mdx @@ -0,0 +1,27 @@ +--- +id: logs-user-into-the-system +sidebar_label: Logs user into the system +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Logs user into the system + +
                                          Query Parameters
                                          + +successful operation + +
                                          Schema
                                          • string
                                          + +Invalid username/password supplied + +
                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/pet.tag.mdx b/demo/docs/petstore_versioned/beta/pet.tag.mdx new file mode 100644 index 000000000..6f8c88d4e --- /dev/null +++ b/demo/docs/petstore_versioned/beta/pet.tag.mdx @@ -0,0 +1,19 @@ +--- +id: pet +title: Pets +description: Pets +--- + + + +Everything about your Pets + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/place-an-order-for-a-pet.api.mdx b/demo/docs/petstore_versioned/beta/place-an-order-for-a-pet.api.mdx new file mode 100644 index 000000000..788fac0fe --- /dev/null +++ b/demo/docs/petstore_versioned/beta/place-an-order-for-a-pet.api.mdx @@ -0,0 +1,47 @@ +--- +id: place-an-order-for-a-pet +sidebar_label: Place an order for a pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"description":"","operationId":"placeOrder","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 Order","content":{"application/json":{"example":{"status":400,"message":"Invalid Order"}}}}},"requestBody":{"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"}}}},"description":"order placed for purchasing the pet","required":true},"method":"post","path":"/store/order","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"petId":{},"quantity":0,"shipDate":"string","status":"placed","complete":false,"requestId":"string"},"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\n\n","version":"beta","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":"Place an order for a pet","description":{"content":"","type":"text/plain"},"url":{"path":["store","order"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Place an order for a pet + +
                                          Request Body required
                                          + +order placed for purchasing the pet + +
                                            id object
                                            + +Order ID + +
                                            allOf
                                              petId object
                                              + +Pet ID + +
                                              allOf
                                              + +successful operation + +
                                              Schema
                                                id object
                                                + +Order ID + +
                                                allOf
                                                  petId object
                                                  + +Pet ID + +
                                                  allOf
                                                  + +Invalid Order + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/returns-pet-inventories-by-status.api.mdx b/demo/docs/petstore_versioned/beta/returns-pet-inventories-by-status.api.mdx new file mode 100644 index 000000000..6677fde7c --- /dev/null +++ b/demo/docs/petstore_versioned/beta/returns-pet-inventories-by-status.api.mdx @@ -0,0 +1,27 @@ +--- +id: returns-pet-inventories-by-status +sidebar_label: Returns pet inventories by status +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Returns pet inventories by status + + + +Returns a map of status codes to quantities + +
                                                  + +successful operation + +
                                                  Schema
                                                  • object
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/sidebar.js b/demo/docs/petstore_versioned/beta/sidebar.js new file mode 100644 index 000000000..a6adb02bf --- /dev/null +++ b/demo/docs/petstore_versioned/beta/sidebar.js @@ -0,0 +1,150 @@ +module.exports = [ + { type: "doc", id: "petstore_versioned/beta/swagger-petstore-yaml" }, + { + type: "category", + label: "Pets", + link: { type: "doc", id: "petstore_versioned/beta/pet" }, + items: [ + { + type: "doc", + id: "petstore_versioned/beta/add-a-new-pet-to-the-store", + label: "Add a new pet to the store", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/beta/update-an-existing-pet", + label: "Update an existing pet", + className: "api-method put", + }, + { + type: "doc", + id: "petstore_versioned/beta/find-pet-by-id", + label: "Find pet by ID", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/beta/updates-a-pet-in-the-store-with-form-data", + label: "Updates a pet in the store with form data", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/beta/deletes-a-pet", + label: "Deletes a pet", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/beta/uploads-an-image", + label: "uploads an image", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/beta/finds-pets-by-status", + label: "Finds Pets by status", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/beta/finds-pets-by-tags", + label: "Finds Pets by tags", + className: "menu__list-item--deprecated api-method get", + }, + ], + }, + { + type: "category", + label: "Petstore Orders", + link: { type: "doc", id: "petstore_versioned/beta/store" }, + items: [ + { + type: "doc", + id: "petstore_versioned/beta/returns-pet-inventories-by-status", + label: "Returns pet inventories by status", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/beta/place-an-order-for-a-pet", + label: "Place an order for a pet", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/beta/find-purchase-order-by-id", + label: "Find purchase order by ID", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/beta/delete-purchase-order-by-id", + label: "Delete purchase order by ID", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/beta/subscribe-to-the-store-events", + label: "Subscribe to the Store events", + className: "api-method post", + }, + ], + }, + { + type: "category", + label: "Users", + link: { type: "doc", id: "petstore_versioned/beta/user" }, + items: [ + { + type: "doc", + id: "petstore_versioned/beta/create-user", + label: "Create user", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/beta/get-user-by-user-name", + label: "Get user by user name", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/beta/updated-user", + label: "Updated user", + className: "api-method put", + }, + { + type: "doc", + id: "petstore_versioned/beta/delete-user", + label: "Delete user", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/beta/creates-list-of-users-with-given-input-array", + label: "Creates list of users with given input array", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/beta/creates-list-of-users-with-given-input-list", + label: "Creates list of users with given input list", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/beta/logs-user-into-the-system", + label: "Logs user into the system", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/beta/logs-out-current-logged-in-user-session", + label: "Logs out current logged in user session", + className: "api-method get", + }, + ], + }, +]; diff --git a/demo/docs/petstore_versioned/beta/store.tag.mdx b/demo/docs/petstore_versioned/beta/store.tag.mdx new file mode 100644 index 000000000..4babae439 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/store.tag.mdx @@ -0,0 +1,19 @@ +--- +id: store +title: Petstore Orders +description: Petstore Orders +--- + + + +Access to Petstore orders + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/subscribe-to-the-store-events.api.mdx b/demo/docs/petstore_versioned/beta/subscribe-to-the-store-events.api.mdx new file mode 100644 index 000000000..68c529f62 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/subscribe-to-the-store-events.api.mdx @@ -0,0 +1,27 @@ +--- +id: subscribe-to-the-store-events +sidebar_label: Subscribe to the Store events +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"description":"Add subscription for a store events","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackUrl":{"type":"string","format":"uri","description":"This URL will be called by the server when the desired event will occur","example":"https://myserver.com/send/callback/here"},"eventName":{"type":"string","description":"Event name for the subscription","enum":["orderInProgress","orderShipped","orderDelivered"],"example":"orderInProgress"}},"required":["callbackUrl","eventName"]}}}},"responses":{"201":{"description":"Subscription added","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string","example":"AAA-123-BBB-456"}}}}}}},"callbacks":{"orderInProgress":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"servers":[{"url":"//callback-url.path-level/v1","description":"Path level server 1"},{"url":"//callback-url.path-level/v2","description":"Path level server 2"}],"post":{"summary":"Order in Progress (Summary)","description":"A callback triggered every time an Order is updated status to \"inProgress\" (Description)","externalDocs":{"description":"Find out more","url":"https://more-details.com/demo"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}},"299":{"description":"Response for cancelling subscription"},"500":{"description":"Callback processing failed and retries will be performed"}},"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"}]},"put":{"description":"Order in Progress (Only Description)","servers":[{"url":"//callback-url.operation-level/v1","description":"Operation level server 1 (Operation override)"},{"url":"//callback-url.operation-level/v2","description":"Operation level server 2 (Operation override)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}}}}}},"orderShipped":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"post":{"description":"Very long description\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\nfugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est laborum.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"estimatedDeliveryDate":{"type":"string","format":"date-time","example":"2018-11-11T16:00:00Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}},"orderDelivered":{"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}":{"post":{"deprecated":true,"summary":"Order delivered","description":"A callback triggered every time an Order is delivered to the recipient","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}}},"method":"post","path":"/store/subscribe","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"callbackUrl":"https://myserver.com/send/callback/here","eventName":"orderInProgress"},"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\n\n","version":"beta","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":"Subscribe to the Store events","description":{"content":"Add subscription for a store events","type":"text/plain"},"url":{"path":["store","subscribe"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Subscribe to the Store events + + + +Add subscription for a store events + +
                                                  Request Body
                                                  + +Subscription added + +
                                                  Schema
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/swagger-petstore-yaml.info.mdx b/demo/docs/petstore_versioned/beta/swagger-petstore-yaml.info.mdx new file mode 100644 index 000000000..7314c0bec --- /dev/null +++ b/demo/docs/petstore_versioned/beta/swagger-petstore-yaml.info.mdx @@ -0,0 +1,64 @@ +--- +id: swagger-petstore-yaml +sidebar_label: Introduction +sidebar_position: 0 +hide_title: true +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Version: beta + +# Swagger Petstore YAML + + + +This is a sample server Petstore server. +You can find out more about Swagger at +[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). +For this sample, you can use the api key `special-key` to test the authorization filters. + +## Introduction +This API is documented in **OpenAPI format** and is based on +[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. +It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) +tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + +## OpenAPI Specification +This API is documented in **OpenAPI format** and is based on +[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. +It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) +tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + +## Cross-Origin Resource Sharing +This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). +And that allows cross-domain communication from the browser. +All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. + +## Authentication + +Petstore offers two forms of authentication: + - API Key + - OAuth2 +OAuth2 - an open protocol to allow secure authorization in a simple +and standard method from web, mobile and desktop applications. + + + + +

                                                  Authentication

                                                  + +Get access to data while protecting your account credentials. +OAuth2 is also a safer and more secure way to give you access. + + +
                                                  Security Scheme Type:oauth2
                                                  implicit OAuth Flow:

                                                  Authorization URL: http://petstore.swagger.io/api/oauth/dialog

                                                  Scopes:
                                                  • write:pets: modify pets in your account
                                                  • read:pets: read your pets
                                                  + +For this sample, you can use the api key `special-key` to test the authorization filters. + + +
                                                  Security Scheme Type:apiKey
                                                  Header parameter name:api_key

                                                  Terms of Service

                                                  http://swagger.io/terms/

                                                  License

                                                  Apache 2.0
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/update-an-existing-pet.api.mdx b/demo/docs/petstore_versioned/beta/update-an-existing-pet.api.mdx new file mode 100644 index 000000000..e790fd717 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/update-an-existing-pet.api.mdx @@ -0,0 +1,35 @@ +--- +id: update-an-existing-pet +sidebar_label: Update an existing pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"description":"","operationId":"updatePet","responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"put","path":"/pet","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\n","version":"beta","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":"Update an existing pet","description":{"content":"","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":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +sidebar_class_name: "put api-method" +info_path: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Update an existing pet + +
                                                  Request Body required
                                                  + +Pet object that needs to be added to the store + +
                                                  + +Invalid ID supplied + +
                                                  + +Pet not found + +
                                                  + +Validation exception + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/updated-user.api.mdx b/demo/docs/petstore_versioned/beta/updated-user.api.mdx new file mode 100644 index 000000000..12754dd5c --- /dev/null +++ b/demo/docs/petstore_versioned/beta/updated-user.api.mdx @@ -0,0 +1,35 @@ +--- +id: updated-user +sidebar_label: Updated user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"description":"This can only be done by the logged in user.","operationId":"updateUser","parameters":[{"name":"username","in":"path","description":"name that need to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"Updated user object","required":true},"method":"put","path":"/user/{username}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\n","version":"beta","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":"Updated 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) name that need to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "put api-method" +info_path: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Updated user + + + +This can only be done by the logged in user. + +
                                                  Path Parameters
                                                  Request Body required
                                                  + +Updated user object + +
                                                  + +Invalid user supplied + +
                                                  + +User not found + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/updates-a-pet-in-the-store-with-form-data.api.mdx b/demo/docs/petstore_versioned/beta/updates-a-pet-in-the-store-with-form-data.api.mdx new file mode 100644 index 000000000..10999d2fc --- /dev/null +++ b/demo/docs/petstore_versioned/beta/updates-a-pet-in-the-store-with-form-data.api.mdx @@ -0,0 +1,23 @@ +--- +id: updates-a-pet-in-the-store-with-form-data +sidebar_label: Updates a pet in the store with form data +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"description":"","operationId":"updatePetWithForm","parameters":[{"name":"petId","in":"path","description":"ID of pet that needs to be updated","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}}}}}},"method":"post","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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":"Updates a pet in the store with form data","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be updated","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"method":"POST","body":{"mode":"urlencoded","urlencoded":[]},"auth":{"type":"oauth2","oauth2":[]}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Updates a pet in the store with form data + +
                                                  Path Parameters
                                                  Request Body
                                                  + +Invalid input + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/uploads-an-image.api.mdx b/demo/docs/petstore_versioned/beta/uploads-an-image.api.mdx new file mode 100644 index 000000000..28f92cdbd --- /dev/null +++ b/demo/docs/petstore_versioned/beta/uploads-an-image.api.mdx @@ -0,0 +1,23 @@ +--- +id: uploads-an-image +sidebar_label: uploads an image +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\n","version":"beta","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: docs/petstore_versioned/beta/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## uploads an image + +
                                                  Path Parameters
                                                  Request Body
                                                  • string
                                                  + +successful operation + +
                                                  Schema
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/beta/user.tag.mdx b/demo/docs/petstore_versioned/beta/user.tag.mdx new file mode 100644 index 000000000..2d819fac2 --- /dev/null +++ b/demo/docs/petstore_versioned/beta/user.tag.mdx @@ -0,0 +1,19 @@ +--- +id: user +title: Users +description: Users +--- + + + +Operations about user + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/create-user.api.mdx b/demo/docs/petstore_versioned/create-user.api.mdx new file mode 100644 index 000000000..fc5eb06ad --- /dev/null +++ b/demo/docs/petstore_versioned/create-user.api.mdx @@ -0,0 +1,31 @@ +--- +id: create-user +sidebar_label: Create user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Create user + + + +This can only be done by the logged in user. + +
                                                  Request Body required
                                                  + +Created user object + +
                                                  + +successful operation + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/creates-list-of-users-with-given-input-array.api.mdx b/demo/docs/petstore_versioned/creates-list-of-users-with-given-input-array.api.mdx new file mode 100644 index 000000000..32dbc6259 --- /dev/null +++ b/demo/docs/petstore_versioned/creates-list-of-users-with-given-input-array.api.mdx @@ -0,0 +1,27 @@ +--- +id: creates-list-of-users-with-given-input-array +sidebar_label: Creates list of users with given input array +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Creates list of users with given input array + +
                                                  Request Body required
                                                  + +List of user object + +
                                                  + +successful operation + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/creates-list-of-users-with-given-input-list.api.mdx b/demo/docs/petstore_versioned/creates-list-of-users-with-given-input-list.api.mdx new file mode 100644 index 000000000..05d57be3b --- /dev/null +++ b/demo/docs/petstore_versioned/creates-list-of-users-with-given-input-list.api.mdx @@ -0,0 +1,27 @@ +--- +id: creates-list-of-users-with-given-input-list +sidebar_label: Creates list of users with given input list +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":[{"id":0,"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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Creates list of users with given input list + +
                                                  Request Body required
                                                  + +List of user object + +
                                                  + +successful operation + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/delete-purchase-order-by-id.api.mdx b/demo/docs/petstore_versioned/delete-purchase-order-by-id.api.mdx new file mode 100644 index 000000000..425550bea --- /dev/null +++ b/demo/docs/petstore_versioned/delete-purchase-order-by-id.api.mdx @@ -0,0 +1,31 @@ +--- +id: delete-purchase-order-by-id +sidebar_label: Delete purchase order by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Delete purchase order by ID + + + +For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors + +
                                                  Path Parameters
                                                  + +Invalid ID supplied + +
                                                  + +Order not found + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/delete-user.api.mdx b/demo/docs/petstore_versioned/delete-user.api.mdx new file mode 100644 index 000000000..91c133a0f --- /dev/null +++ b/demo/docs/petstore_versioned/delete-user.api.mdx @@ -0,0 +1,31 @@ +--- +id: delete-user +sidebar_label: Delete user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Delete user + + + +This can only be done by the logged in user. + +
                                                  Path Parameters
                                                  + +Invalid username supplied + +
                                                  + +User not found + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/deletes-a-pet.api.mdx b/demo/docs/petstore_versioned/deletes-a-pet.api.mdx new file mode 100644 index 000000000..fa8b099bc --- /dev/null +++ b/demo/docs/petstore_versioned/deletes-a-pet.api.mdx @@ -0,0 +1,23 @@ +--- +id: deletes-a-pet +sidebar_label: Deletes a pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Deletes a pet + +
                                                  Path Parameters
                                                  Header Parameters
                                                    "}}>
                                                  + +Invalid pet value + +
                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/find-pet-by-id.api.mdx b/demo/docs/petstore_versioned/find-pet-by-id.api.mdx new file mode 100644 index 000000000..67013c0b7 --- /dev/null +++ b/demo/docs/petstore_versioned/find-pet-by-id.api.mdx @@ -0,0 +1,47 @@ +--- +id: find-pet-by-id +sidebar_label: Find pet by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}},"application/xml":{"schema":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}},"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"}},"security":[{"api_key":[]}],"method":"get","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Find pet by ID + + + +Returns a single pet + +
                                                  Path Parameters
                                                  + +successful operation + +
                                                  Schema
                                                    id object
                                                    + +Pet ID + +
                                                    allOf
                                                      category object
                                                      + +Categories this pet belongs to + +
                                                      allOf
                                                        sub object
                                                        + +Test Sub Category + +
                                                      friend object
                                                      allOf
                                                      + +Invalid ID supplied + +
                                                      + +Pet not found + +
                                                      + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/find-purchase-order-by-id.api.mdx b/demo/docs/petstore_versioned/find-purchase-order-by-id.api.mdx new file mode 100644 index 000000000..942fed38f --- /dev/null +++ b/demo/docs/petstore_versioned/find-purchase-order-by-id.api.mdx @@ -0,0 +1,43 @@ +--- +id: find-purchase-order-by-id +sidebar_label: Find purchase order by ID +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Find purchase order by ID + + + +For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions + +
                                                      Path Parameters
                                                      + +successful operation + +
                                                      Schema
                                                        id object
                                                        + +Order ID + +
                                                        allOf
                                                          petId object
                                                          + +Pet ID + +
                                                          allOf
                                                          + +Invalid ID supplied + +
                                                          + +Order not found + +
                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/finds-pets-by-status.api.mdx b/demo/docs/petstore_versioned/finds-pets-by-status.api.mdx new file mode 100644 index 000000000..5cae5d719 --- /dev/null +++ b/demo/docs/petstore_versioned/finds-pets-by-status.api.mdx @@ -0,0 +1,43 @@ +--- +id: finds-pets-by-status +sidebar_label: Finds Pets by status +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid status value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByStatus","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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":[]}}} +sidebar_class_name: "get api-method" +info_path: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Finds Pets by status + + + +Multiple status values can be provided with comma separated strings + +
                                                          Query Parameters
                                                          + +successful operation + +
                                                          Schema
                                                            • id object
                                                              + +Pet ID + +
                                                              allOf
                                                                category object
                                                                + +Categories this pet belongs to + +
                                                                allOf
                                                                  sub object
                                                                  + +Test Sub Category + +
                                                                friend object
                                                                allOf
                                                              + +Invalid status value + +
                                                              + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/finds-pets-by-tags.api.mdx b/demo/docs/petstore_versioned/finds-pets-by-tags.api.mdx new file mode 100644 index 000000000..603f34bbf --- /dev/null +++ b/demo/docs/petstore_versioned/finds-pets-by-tags.api.mdx @@ -0,0 +1,47 @@ +--- +id: finds-pets-by-tags +sidebar_label: Finds Pets by tags +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}},"application/xml":{"schema":{"type":"array","items":{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}}}}}},"400":{"description":"Invalid tag value"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"method":"get","path":"/pet/findByTags","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Finds Pets by tags + +:::caution deprecated + +This endpoint has been deprecated and may be removed in future versions of the API. + +::: + +Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. + +
                                                              Query Parameters
                                                              + +successful operation + +
                                                              Schema
                                                                • id object
                                                                  + +Pet ID + +
                                                                  allOf
                                                                    category object
                                                                    + +Categories this pet belongs to + +
                                                                    allOf
                                                                      sub object
                                                                      + +Test Sub Category + +
                                                                    friend object
                                                                    allOf
                                                                  + +Invalid tag value + +
                                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/get-user-by-user-name.api.mdx b/demo/docs/petstore_versioned/get-user-by-user-name.api.mdx new file mode 100644 index 000000000..e8f7f7671 --- /dev/null +++ b/demo/docs/petstore_versioned/get-user-by-user-name.api.mdx @@ -0,0 +1,31 @@ +--- +id: get-user-by-user-name +sidebar_label: Get user by user name +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Get user by user name + +
                                                                  Path Parameters
                                                                  + +successful operation + +
                                                                  Schema
                                                                  + +Invalid username supplied + +
                                                                  + +User not found + +
                                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/logs-out-current-logged-in-user-session.api.mdx b/demo/docs/petstore_versioned/logs-out-current-logged-in-user-session.api.mdx new file mode 100644 index 000000000..db231e633 --- /dev/null +++ b/demo/docs/petstore_versioned/logs-out-current-logged-in-user-session.api.mdx @@ -0,0 +1,23 @@ +--- +id: logs-out-current-logged-in-user-session +sidebar_label: Logs out current logged in user session +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"description":"","operationId":"logoutUser","responses":{"default":{"description":"successful operation"}},"method":"get","path":"/user/logout","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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 out current logged in user session","description":{"content":"","type":"text/plain"},"url":{"path":["user","logout"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"method":"GET"}} +sidebar_class_name: "get api-method" +info_path: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Logs out current logged in user session + +
                                                                  + +successful operation + +
                                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/logs-user-into-the-system.api.mdx b/demo/docs/petstore_versioned/logs-user-into-the-system.api.mdx new file mode 100644 index 000000000..cb56c909a --- /dev/null +++ b/demo/docs/petstore_versioned/logs-user-into-the-system.api.mdx @@ -0,0 +1,27 @@ +--- +id: logs-user-into-the-system +sidebar_label: Logs user into the system +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Logs user into the system + +
                                                                  Query Parameters
                                                                  + +successful operation + +
                                                                  Schema
                                                                  • string
                                                                  + +Invalid username/password supplied + +
                                                                  + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/pet.tag.mdx b/demo/docs/petstore_versioned/pet.tag.mdx new file mode 100644 index 000000000..6f8c88d4e --- /dev/null +++ b/demo/docs/petstore_versioned/pet.tag.mdx @@ -0,0 +1,19 @@ +--- +id: pet +title: Pets +description: Pets +--- + + + +Everything about your Pets + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/place-an-order-for-a-pet.api.mdx b/demo/docs/petstore_versioned/place-an-order-for-a-pet.api.mdx new file mode 100644 index 000000000..b0b5cdfed --- /dev/null +++ b/demo/docs/petstore_versioned/place-an-order-for-a-pet.api.mdx @@ -0,0 +1,47 @@ +--- +id: place-an-order-for-a-pet +sidebar_label: Place an order for a pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"description":"","operationId":"placeOrder","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 Order","content":{"application/json":{"example":{"status":400,"message":"Invalid Order"}}}}},"requestBody":{"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"}}}},"description":"order placed for purchasing the pet","required":true},"method":"post","path":"/store/order","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"petId":{},"quantity":0,"shipDate":"string","status":"placed","complete":false,"requestId":"string"},"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\n\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":"Place an order for a pet","description":{"content":"","type":"text/plain"},"url":{"path":["store","order"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Place an order for a pet + +
                                                                  Request Body required
                                                                  + +order placed for purchasing the pet + +
                                                                    id object
                                                                    + +Order ID + +
                                                                    allOf
                                                                      petId object
                                                                      + +Pet ID + +
                                                                      allOf
                                                                      + +successful operation + +
                                                                      Schema
                                                                        id object
                                                                        + +Order ID + +
                                                                        allOf
                                                                          petId object
                                                                          + +Pet ID + +
                                                                          allOf
                                                                          + +Invalid Order + +
                                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/returns-pet-inventories-by-status.api.mdx b/demo/docs/petstore_versioned/returns-pet-inventories-by-status.api.mdx new file mode 100644 index 000000000..e53cec613 --- /dev/null +++ b/demo/docs/petstore_versioned/returns-pet-inventories-by-status.api.mdx @@ -0,0 +1,27 @@ +--- +id: returns-pet-inventories-by-status +sidebar_label: Returns pet inventories by status +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Returns pet inventories by status + + + +Returns a map of status codes to quantities + +
                                                                          + +successful operation + +
                                                                          Schema
                                                                          • object
                                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/sidebar.js b/demo/docs/petstore_versioned/sidebar.js new file mode 100644 index 000000000..f4ca74806 --- /dev/null +++ b/demo/docs/petstore_versioned/sidebar.js @@ -0,0 +1,150 @@ +module.exports = [ + { type: "doc", id: "petstore_versioned/swagger-petstore-yaml" }, + { + type: "category", + label: "Pets", + link: { type: "doc", id: "petstore_versioned/pet" }, + items: [ + { + type: "doc", + id: "petstore_versioned/add-a-new-pet-to-the-store", + label: "Add a new pet to the store", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/update-an-existing-pet", + label: "Update an existing pet", + className: "api-method put", + }, + { + type: "doc", + id: "petstore_versioned/find-pet-by-id", + label: "Find pet by ID", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/updates-a-pet-in-the-store-with-form-data", + label: "Updates a pet in the store with form data", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/deletes-a-pet", + label: "Deletes a pet", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/uploads-an-image", + label: "uploads an image", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/finds-pets-by-status", + label: "Finds Pets by status", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/finds-pets-by-tags", + label: "Finds Pets by tags", + className: "menu__list-item--deprecated api-method get", + }, + ], + }, + { + type: "category", + label: "Petstore Orders", + link: { type: "doc", id: "petstore_versioned/store" }, + items: [ + { + type: "doc", + id: "petstore_versioned/returns-pet-inventories-by-status", + label: "Returns pet inventories by status", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/place-an-order-for-a-pet", + label: "Place an order for a pet", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/find-purchase-order-by-id", + label: "Find purchase order by ID", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/delete-purchase-order-by-id", + label: "Delete purchase order by ID", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/subscribe-to-the-store-events", + label: "Subscribe to the Store events", + className: "api-method post", + }, + ], + }, + { + type: "category", + label: "Users", + link: { type: "doc", id: "petstore_versioned/user" }, + items: [ + { + type: "doc", + id: "petstore_versioned/create-user", + label: "Create user", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/get-user-by-user-name", + label: "Get user by user name", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/updated-user", + label: "Updated user", + className: "api-method put", + }, + { + type: "doc", + id: "petstore_versioned/delete-user", + label: "Delete user", + className: "api-method delete", + }, + { + type: "doc", + id: "petstore_versioned/creates-list-of-users-with-given-input-array", + label: "Creates list of users with given input array", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/creates-list-of-users-with-given-input-list", + label: "Creates list of users with given input list", + className: "api-method post", + }, + { + type: "doc", + id: "petstore_versioned/logs-user-into-the-system", + label: "Logs user into the system", + className: "api-method get", + }, + { + type: "doc", + id: "petstore_versioned/logs-out-current-logged-in-user-session", + label: "Logs out current logged in user session", + className: "api-method get", + }, + ], + }, +]; diff --git a/demo/docs/petstore_versioned/store.tag.mdx b/demo/docs/petstore_versioned/store.tag.mdx new file mode 100644 index 000000000..4babae439 --- /dev/null +++ b/demo/docs/petstore_versioned/store.tag.mdx @@ -0,0 +1,19 @@ +--- +id: store +title: Petstore Orders +description: Petstore Orders +--- + + + +Access to Petstore orders + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/subscribe-to-the-store-events.api.mdx b/demo/docs/petstore_versioned/subscribe-to-the-store-events.api.mdx new file mode 100644 index 000000000..601c1fbf6 --- /dev/null +++ b/demo/docs/petstore_versioned/subscribe-to-the-store-events.api.mdx @@ -0,0 +1,27 @@ +--- +id: subscribe-to-the-store-events +sidebar_label: Subscribe to the Store events +hide_title: true +hide_table_of_contents: true +api: {"tags":["Petstore Orders"],"description":"Add subscription for a store events","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"callbackUrl":{"type":"string","format":"uri","description":"This URL will be called by the server when the desired event will occur","example":"https://myserver.com/send/callback/here"},"eventName":{"type":"string","description":"Event name for the subscription","enum":["orderInProgress","orderShipped","orderDelivered"],"example":"orderInProgress"}},"required":["callbackUrl","eventName"]}}}},"responses":{"201":{"description":"Subscription added","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string","example":"AAA-123-BBB-456"}}}}}}},"callbacks":{"orderInProgress":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"servers":[{"url":"//callback-url.path-level/v1","description":"Path level server 1"},{"url":"//callback-url.path-level/v2","description":"Path level server 2"}],"post":{"summary":"Order in Progress (Summary)","description":"A callback triggered every time an Order is updated status to \"inProgress\" (Description)","externalDocs":{"description":"Find out more","url":"https://more-details.com/demo"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}},"299":{"description":"Response for cancelling subscription"},"500":{"description":"Callback processing failed and retries will be performed"}},"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"}]},"put":{"description":"Order in Progress (Only Description)","servers":[{"url":"//callback-url.operation-level/v1","description":"Operation level server 1 (Operation override)"},{"url":"//callback-url.operation-level/v2","description":"Operation level server 2 (Operation override)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"status":{"type":"string","example":"inProgress"}}}},"application/xml":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"}}},"example":"\n\n 123\n inProgress\n 2018-10-19T16:46:45Z\n\n"}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed","content":{"application/json":{"schema":{"type":"object","properties":{"someProp":{"type":"string","example":"123"}}}}}}}}}},"orderShipped":{"{$request.body#/callbackUrl}?event={$request.body#/eventName}":{"post":{"description":"Very long description\nLorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\nincididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\nnostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\nDuis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\nfugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\nculpa qui officia deserunt mollit anim id est laborum.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"},"estimatedDeliveryDate":{"type":"string","format":"date-time","example":"2018-11-11T16:00:00Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}},"orderDelivered":{"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}":{"post":{"deprecated":true,"summary":"Order delivered","description":"A callback triggered every time an Order is delivered to the recipient","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"orderId":{"type":"string","example":"123"},"timestamp":{"type":"string","format":"date-time","example":"2018-10-19T16:46:45Z"}}}}}},"responses":{"200":{"description":"Callback successfully processed and no retries will be performed"}}}}}},"method":"post","path":"/store/subscribe","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"callbackUrl":"https://myserver.com/send/callback/here","eventName":"orderInProgress"},"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\n\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":"Subscribe to the Store events","description":{"content":"Add subscription for a store events","type":"text/plain"},"url":{"path":["store","subscribe"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Subscribe to the Store events + + + +Add subscription for a store events + +
                                                                          Request Body
                                                                          + +Subscription added + +
                                                                          Schema
                                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/swagger-petstore-yaml.info.mdx b/demo/docs/petstore_versioned/swagger-petstore-yaml.info.mdx new file mode 100644 index 000000000..44d06fe3f --- /dev/null +++ b/demo/docs/petstore_versioned/swagger-petstore-yaml.info.mdx @@ -0,0 +1,64 @@ +--- +id: swagger-petstore-yaml +sidebar_label: Introduction +sidebar_position: 0 +hide_title: true +--- + +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + +Version: 2.0.0 + +# Swagger Petstore YAML + + + +This is a sample server Petstore server. +You can find out more about Swagger at +[http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). +For this sample, you can use the api key `special-key` to test the authorization filters. + +## Introduction +This API is documented in **OpenAPI format** and is based on +[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. +It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) +tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + +## OpenAPI Specification +This API is documented in **OpenAPI format** and is based on +[Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. +It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) +tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard +OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + +## Cross-Origin Resource Sharing +This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). +And that allows cross-domain communication from the browser. +All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. + +## Authentication + +Petstore offers two forms of authentication: + - API Key + - OAuth2 +OAuth2 - an open protocol to allow secure authorization in a simple +and standard method from web, mobile and desktop applications. + + + + +

                                                                          Authentication

                                                                          + +Get access to data while protecting your account credentials. +OAuth2 is also a safer and more secure way to give you access. + + +
                                                                          Security Scheme Type:oauth2
                                                                          implicit OAuth Flow:

                                                                          Authorization URL: http://petstore.swagger.io/api/oauth/dialog

                                                                          Scopes:
                                                                          • write:pets: modify pets in your account
                                                                          • read:pets: read your pets
                                                                          + +For this sample, you can use the api key `special-key` to test the authorization filters. + + +
                                                                          Security Scheme Type:apiKey
                                                                          Header parameter name:api_key

                                                                          Terms of Service

                                                                          http://swagger.io/terms/

                                                                          License

                                                                          Apache 2.0
                                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/update-an-existing-pet.api.mdx b/demo/docs/petstore_versioned/update-an-existing-pet.api.mdx new file mode 100644 index 000000000..1c3cdfb37 --- /dev/null +++ b/demo/docs/petstore_versioned/update-an-existing-pet.api.mdx @@ -0,0 +1,35 @@ +--- +id: update-an-existing-pet +sidebar_label: Update an existing pet +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"description":"","operationId":"updatePet","responses":{"400":{"description":"Invalid ID supplied"},"404":{"description":"Pet not found"},"405":{"description":"Validation exception"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"x-codeSamples":[{"lang":"PHP","source":"$form = new \\PetStore\\Entities\\Pet();\n$form->setPetId(1);\n$form->setPetType(\"Dog\");\n$form->setName(\"Rex\");\n// set other fields\ntry {\n $pet = $client->pets()->update($form);\n} catch (UnprocessableEntityException $e) {\n var_dump($e->getErrors());\n}\n"}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"description":"My Pet","title":"Pettie"},{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"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":"put","path":"/pet","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":{},"category":{"id":{},"name":"string","sub":{"prop1":"string"}},"name":"Guru","photoUrls":["string"],"friend":{},"tags":[{"id":{},"name":"string"}],"status":"available","petType":"string"},"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\n\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":"Update an existing pet","description":{"content":"","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":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}} +sidebar_class_name: "put api-method" +info_path: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Update an existing pet + +
                                                                          Request Body required
                                                                          + +Pet object that needs to be added to the store + +
                                                                          + +Invalid ID supplied + +
                                                                          + +Pet not found + +
                                                                          + +Validation exception + +
                                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/updated-user.api.mdx b/demo/docs/petstore_versioned/updated-user.api.mdx new file mode 100644 index 000000000..a6bd696fd --- /dev/null +++ b/demo/docs/petstore_versioned/updated-user.api.mdx @@ -0,0 +1,35 @@ +--- +id: updated-user +sidebar_label: Updated user +hide_title: true +hide_table_of_contents: true +api: {"tags":["Users"],"description":"This can only be done by the logged in user.","operationId":"updateUser","parameters":[{"name":"username","in":"path","description":"name that need to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"400":{"description":"Invalid user supplied"},"404":{"description":"User not found"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","format":"int64","readOnly":true},"pet":{"oneOf":[{"type":"object","required":["name","photoUrls"],"discriminator":{"propertyName":"petType","mapping":{"cat":"#/components/schemas/Cat","dog":"#/components/schemas/Dog","bee":"#/components/schemas/HoneyBee"}},"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":[{"$ref":"#/components/schemas/Pet"}]},"tags":{"description":"Tags attached to the pet","type":"array","minItems":1,"xml":{"name":"tag","wrapped":true},"items":{"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"}},"xml":{"name":"Pet"}},{"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":"Updated user object","required":true},"method":"put","path":"/user/{username}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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":{"id":0,"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\n\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":"Updated 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) name that need to be deleted","type":"text/plain"},"type":"any","value":"","key":"username"}]},"header":[{"key":"Content-Type","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +sidebar_class_name: "put api-method" +info_path: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Updated user + + + +This can only be done by the logged in user. + +
                                                                          Path Parameters
                                                                          Request Body required
                                                                          + +Updated user object + +
                                                                          + +Invalid user supplied + +
                                                                          + +User not found + +
                                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/updates-a-pet-in-the-store-with-form-data.api.mdx b/demo/docs/petstore_versioned/updates-a-pet-in-the-store-with-form-data.api.mdx new file mode 100644 index 000000000..37a7d56a9 --- /dev/null +++ b/demo/docs/petstore_versioned/updates-a-pet-in-the-store-with-form-data.api.mdx @@ -0,0 +1,23 @@ +--- +id: updates-a-pet-in-the-store-with-form-data +sidebar_label: Updates a pet in the store with form data +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"description":"","operationId":"updatePetWithForm","parameters":[{"name":"petId","in":"path","description":"ID of pet that needs to be updated","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"405":{"description":"Invalid input"}},"security":[{"petstore_auth":["write:pets","read:pets"]}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"name":{"description":"Updated name of the pet","type":"string"},"status":{"description":"Updated status of the pet","type":"string"}}}}}},"method":"post","path":"/pet/{petId}","servers":[{"url":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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":"Updates a pet in the store with form data","description":{"content":"","type":"text/plain"},"url":{"path":["pet",":petId"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ID of pet that needs to be updated","type":"text/plain"},"type":"any","value":"","key":"petId"}]},"header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"method":"POST","body":{"mode":"urlencoded","urlencoded":[]},"auth":{"type":"oauth2","oauth2":[]}}} +sidebar_class_name: "post api-method" +info_path: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## Updates a pet in the store with form data + +
                                                                          Path Parameters
                                                                          Request Body
                                                                          + +Invalid input + +
                                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/uploads-an-image.api.mdx b/demo/docs/petstore_versioned/uploads-an-image.api.mdx new file mode 100644 index 000000000..792cba110 --- /dev/null +++ b/demo/docs/petstore_versioned/uploads-an-image.api.mdx @@ -0,0 +1,23 @@ +--- +id: uploads-an-image +sidebar_label: uploads an image +hide_title: true +hide_table_of_contents: true +api: {"tags":["Pets"],"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":"//petstore.swagger.io/v2","description":"Default server"},{"url":"//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\n\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: docs/petstore_versioned/swagger-petstore-yaml +--- + +import ParamsItem from "@theme/ParamsItem"; +import SchemaItem from "@theme/SchemaItem" +import ApiTabs from "@theme/ApiTabs"; +import TabItem from "@theme/TabItem"; + +## uploads an image + +
                                                                          Path Parameters
                                                                          Request Body
                                                                          • string
                                                                          + +successful operation + +
                                                                          Schema
                                                                          + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/user.tag.mdx b/demo/docs/petstore_versioned/user.tag.mdx new file mode 100644 index 000000000..2d819fac2 --- /dev/null +++ b/demo/docs/petstore_versioned/user.tag.mdx @@ -0,0 +1,19 @@ +--- +id: user +title: Users +description: Users +--- + + + +Operations about user + + + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; +import {useCurrentSidebarCategory} from '@docusaurus/theme-common'; + + +``` + \ No newline at end of file diff --git a/demo/docs/petstore_versioned/versions.json b/demo/docs/petstore_versioned/versions.json new file mode 100644 index 000000000..0f2287969 --- /dev/null +++ b/demo/docs/petstore_versioned/versions.json @@ -0,0 +1,17 @@ +[ + { + "version": "2.0.0", + "label": "Current", + "baseUrl": "/docs/petstore_versioned/swagger-petstore-yaml" + }, + { + "version": "1.0.0", + "label": "Deprecated", + "baseUrl": "/docs/petstore_versioned/1.0.0/swagger-petstore-yaml" + }, + { + "version": "beta", + "label": "Beta", + "baseUrl": "/docs/petstore_versioned/beta/swagger-petstore-yaml" + } +] From 1d1ff76d04118d7dba525dc3b0ee1978d806e135 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 18:49:14 -0500 Subject: [PATCH 08/20] Update petstore specs --- demo/examples/petstore-1.0.0.yaml | 1208 +++++++++++++++++++++++++++++ demo/examples/petstore-beta.yaml | 1208 +++++++++++++++++++++++++++++ demo/examples/petstore.yaml | 2 +- 3 files changed, 2417 insertions(+), 1 deletion(-) create mode 100644 demo/examples/petstore-1.0.0.yaml create mode 100644 demo/examples/petstore-beta.yaml diff --git a/demo/examples/petstore-1.0.0.yaml b/demo/examples/petstore-1.0.0.yaml new file mode 100644 index 000000000..a0aaebd04 --- /dev/null +++ b/demo/examples/petstore-1.0.0.yaml @@ -0,0 +1,1208 @@ +openapi: 3.0.0 +servers: + - url: //petstore.swagger.io/v2 + description: Default server + - url: //petstore.swagger.io/sandbox + description: Sandbox server +info: + description: | + This is a sample server Petstore server. + You can find out more about Swagger at + [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + For this sample, you can use the api key `special-key` to test the authorization filters. + + ## Introduction + This API is documented in **OpenAPI format** and is based on + [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. + It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) + tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + + ## OpenAPI Specification + This API is documented in **OpenAPI format** and is based on + [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. + It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) + tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + + ## Cross-Origin Resource Sharing + This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). + And that allows cross-domain communication from the browser. + All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. + + ## Authentication + + Petstore offers two forms of authentication: + - API Key + - OAuth2 + OAuth2 - an open protocol to allow secure authorization in a simple + and standard method from web, mobile and desktop applications. + + + + version: 1.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" +externalDocs: + description: Find out how to create Github repo for your OpenAPI spec. + url: "https://github.com/Rebilly/generator-openapi-repo" +tags: + - name: pet + description: Everything about your Pets + x-displayName: Pets + - name: store + description: Access to Petstore orders + x-displayName: Petstore Orders + - name: user + description: Operations about user + x-displayName: Users + - name: pet_model + x-displayName: The Pet Model + description: | + + - name: store_model + x-displayName: The Order Model + description: | + +x-tagGroups: + - name: General + tags: + - pet + - store + - name: User Management + tags: + - user + - name: Models + tags: + - pet_model + - store_model +paths: + /pet: + parameters: + - name: Accept-Language + in: header + description: "The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US" + example: en-US + required: false + schema: + type: string + default: en-AU + - name: cookieParam + in: cookie + description: Some cookie + required: true + schema: + type: integer + format: int64 + post: + tags: + - pet + summary: Add a new pet to the store + 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(); + pet.setApiKey("your api key"); + pet.petType = PetStore.v1.Pet.TYPE_DOG; + pet.name = "Rex"; + // set other fields + PetStoreResponse response = pet.create(); + if (response.statusCode == HttpStatusCode.Created) + { + // Successfully created + } + else + { + // Something wrong -- check response for errors + Console.WriteLine(response.getRawResponse()); + } + - lang: PHP + source: | + $form = new \PetStore\Entities\Pet(); + $form->setPetType("Dog"); + $form->setName("Rex"); + // set other fields + try { + $pet = $client->pets()->create($form); + } catch (UnprocessableEntityException $e) { + var_dump($e->getErrors()); + } + requestBody: + $ref: "#/components/requestBodies/Pet" + put: + tags: + - pet + summary: Update an existing pet + description: "" + operationId: updatePet + responses: + "400": + description: Invalid ID supplied + "404": + description: Pet not found + "405": + description: Validation exception + security: + - petstore_auth: + - "write:pets" + - "read:pets" + x-codeSamples: + - lang: PHP + source: | + $form = new \PetStore\Entities\Pet(); + $form->setPetId(1); + $form->setPetType("Dog"); + $form->setName("Rex"); + // set other fields + try { + $pet = $client->pets()->update($form); + } catch (UnprocessableEntityException $e) { + var_dump($e->getErrors()); + } + requestBody: + $ref: "#/components/requestBodies/Pet" + "/pet/{petId}": + get: + tags: + - pet + summary: Find pet by ID + 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: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid ID supplied + "404": + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: "" + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + "405": + description: Invalid input + security: + - petstore_auth: + - "write:pets" + - "read:pets" + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a 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" + "/pet/{petId}/uploadImage": + post: + tags: + - pet + summary: uploads an image + 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: + $ref: "#/components/schemas/ApiResponse" + security: + - petstore_auth: + - "write:pets" + - "read:pets" + requestBody: + content: + application/octet-stream: + schema: + type: string + format: binary + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + 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: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + type: array + items: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid status value + security: + - petstore_auth: + - "write:pets" + - "read:pets" + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + 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: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + type: array + items: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid tag value + security: + - petstore_auth: + - "write:pets" + - "read:pets" + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + 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: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: "" + operationId: placeOrder + responses: + "200": + description: successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/Order" + application/xml: + schema: + $ref: "#/components/schemas/Order" + "400": + description: Invalid Order + content: + application/json: + example: + status: 400 + message: "Invalid Order" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Order" + description: order placed for purchasing the pet + required: true + "/store/order/{orderId}": + get: + tags: + - store + summary: Find purchase order by ID + 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: + $ref: "#/components/schemas/Order" + application/xml: + schema: + $ref: "#/components/schemas/Order" + "400": + description: Invalid ID supplied + "404": + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + 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 + /store/subscribe: + post: + tags: + - store + summary: Subscribe to the Store events + description: Add subscription for a store events + requestBody: + content: + application/json: + schema: + type: object + properties: + callbackUrl: + type: string + format: uri + description: This URL will be called by the server when the desired event will occur + example: https://myserver.com/send/callback/here + eventName: + type: string + description: Event name for the subscription + enum: + - orderInProgress + - orderShipped + - orderDelivered + example: orderInProgress + required: + - callbackUrl + - eventName + responses: + "201": + description: Subscription added + content: + application/json: + schema: + type: object + properties: + subscriptionId: + type: string + example: AAA-123-BBB-456 + callbacks: + orderInProgress: + "{$request.body#/callbackUrl}?event={$request.body#/eventName}": + servers: + - url: //callback-url.path-level/v1 + description: Path level server 1 + - url: //callback-url.path-level/v2 + description: Path level server 2 + post: + summary: Order in Progress (Summary) + description: A callback triggered every time an Order is updated status to "inProgress" (Description) + externalDocs: + description: Find out more + url: "https://more-details.com/demo" + requestBody: + content: + application/json: + schema: + type: object + properties: + orderId: + type: string + example: "123" + timestamp: + type: string + format: date-time + example: "2018-10-19T16:46:45Z" + status: + type: string + example: "inProgress" + application/xml: + schema: + type: object + properties: + orderId: + type: string + example: "123" + example: | + + + 123 + inProgress + 2018-10-19T16:46:45Z + + responses: + "200": + description: Callback successfully processed and no retries will be performed + content: + application/json: + schema: + type: object + properties: + someProp: + type: string + example: "123" + "299": + description: Response for cancelling subscription + "500": + description: Callback processing failed and retries will be performed + x-codeSamples: + - lang: "C#" + source: | + PetStore.v1.Pet pet = new PetStore.v1.Pet(); + pet.setApiKey("your api key"); + pet.petType = PetStore.v1.Pet.TYPE_DOG; + pet.name = "Rex"; + // set other fields + PetStoreResponse response = pet.create(); + if (response.statusCode == HttpStatusCode.Created) + { + // Successfully created + } + else + { + // Something wrong -- check response for errors + Console.WriteLine(response.getRawResponse()); + } + - lang: PHP + source: | + $form = new \PetStore\Entities\Pet(); + $form->setPetType("Dog"); + $form->setName("Rex"); + // set other fields + try { + $pet = $client->pets()->create($form); + } catch (UnprocessableEntityException $e) { + var_dump($e->getErrors()); + } + put: + description: Order in Progress (Only Description) + servers: + - url: //callback-url.operation-level/v1 + description: Operation level server 1 (Operation override) + - url: //callback-url.operation-level/v2 + description: Operation level server 2 (Operation override) + requestBody: + content: + application/json: + schema: + type: object + properties: + orderId: + type: string + example: "123" + timestamp: + type: string + format: date-time + example: "2018-10-19T16:46:45Z" + status: + type: string + example: "inProgress" + application/xml: + schema: + type: object + properties: + orderId: + type: string + example: "123" + example: | + + + 123 + inProgress + 2018-10-19T16:46:45Z + + responses: + "200": + description: Callback successfully processed and no retries will be performed + content: + application/json: + schema: + type: object + properties: + someProp: + type: string + example: "123" + orderShipped: + "{$request.body#/callbackUrl}?event={$request.body#/eventName}": + post: + description: | + Very long description + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis + nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. + requestBody: + content: + application/json: + schema: + type: object + properties: + orderId: + type: string + example: "123" + timestamp: + type: string + format: date-time + example: "2018-10-19T16:46:45Z" + estimatedDeliveryDate: + type: string + format: date-time + example: "2018-11-11T16:00:00Z" + responses: + "200": + description: Callback successfully processed and no retries will be performed + orderDelivered: + "http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}": + post: + deprecated: true + summary: Order delivered + description: A callback triggered every time an Order is delivered to the recipient + requestBody: + content: + application/json: + schema: + type: object + properties: + orderId: + type: string + example: "123" + timestamp: + type: string + format: date-time + example: "2018-10-19T16:46:45Z" + responses: + "200": + description: Callback successfully processed and no retries will be performed + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Created user object + required: true + "/user/{username}": + get: + tags: + - user + summary: Get user by user name + 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: + $ref: "#/components/schemas/User" + application/xml: + schema: + $ref: "#/components/schemas/User" + "400": + description: Invalid username supplied + "404": + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + "400": + description: Invalid user supplied + "404": + description: User not found + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete 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 + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: "" + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + requestBody: + $ref: "#/components/requestBodies/UserArray" + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input list + description: "" + operationId: createUsersWithListInput + responses: + default: + description: successful operation + requestBody: + $ref: "#/components/requestBodies/UserArray" + /user/login: + get: + tags: + - user + summary: Logs user into the system + 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 + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: "" + operationId: logoutUser + responses: + default: + description: successful operation +components: + schemas: + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Cat: + description: A representation of a cat + allOf: + - $ref: "#/components/schemas/Pet" + - type: object + properties: + huntingSkill: + type: string + description: The measured skill for hunting + default: lazy + example: adventurous + enum: + - clueless + - lazy + - adventurous + - aggressive + required: + - huntingSkill + Category: + type: object + properties: + id: + description: Category ID + allOf: + - $ref: "#/components/schemas/Id" + 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 + Dog: + description: A representation of a dog + allOf: + - $ref: "#/components/schemas/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 + HoneyBee: + description: A representation of a honey bee + allOf: + - $ref: "#/components/schemas/Pet" + - type: object + properties: + honeyPerDay: + type: number + description: Average amount of honey produced per day in ounces + example: 3.14 + multipleOf: .01 + required: + - honeyPerDay + Id: + type: integer + format: int64 + readOnly: true + Order: + type: object + properties: + id: + description: Order ID + allOf: + - $ref: "#/components/schemas/Id" + petId: + description: Pet ID + allOf: + - $ref: "#/components/schemas/Id" + 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 + Pet: + type: object + required: + - name + - photoUrls + discriminator: + propertyName: petType + mapping: + cat: "#/components/schemas/Cat" + dog: "#/components/schemas/Dog" + bee: "#/components/schemas/HoneyBee" + properties: + id: + externalDocs: + description: "Find more info here" + url: "https://example.com" + description: Pet ID + allOf: + - $ref: "#/components/schemas/Id" + category: + description: Categories this pet belongs to + allOf: + - $ref: "#/components/schemas/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: + - $ref: "#/components/schemas/Pet" + tags: + description: Tags attached to the pet + type: array + minItems: 1 + xml: + name: tag + wrapped: true + items: + $ref: "#/components/schemas/Tag" + status: + type: string + description: Pet status in the store + enum: + - available + - pending + - sold + petType: + description: Type of a pet + type: string + xml: + name: Pet + Tag: + type: object + properties: + id: + description: Tag ID + allOf: + - $ref: "#/components/schemas/Id" + name: + description: Tag name + type: string + minLength: 1 + xml: + name: Tag + User: + type: object + properties: + id: + $ref: "#/components/schemas/Id" + pet: + oneOf: + - $ref: "#/components/schemas/Pet" + - $ref: "#/components/schemas/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 + requestBodies: + Pet: + content: + application/json: + schema: + allOf: + - description: My Pet + title: Pettie + - $ref: "#/components/schemas/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 + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/User" + description: List of user object + required: true + securitySchemes: + petstore_auth: + description: | + Get access to data while protecting your account credentials. + OAuth2 is also a safer and more secure way to give you access. + 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. + type: apiKey + name: api_key + in: header + examples: + Order: + value: + quantity: 1 + shipDate: "2018-10-19T16:46:45Z" + status: placed + complete: false +x-webhooks: + newPet: + post: + summary: New pet + description: Information about a new pet in the systems + operationId: newPet + tags: + - pet + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + responses: + "200": + description: Return a 200 status to indicate that the data was received successfully diff --git a/demo/examples/petstore-beta.yaml b/demo/examples/petstore-beta.yaml new file mode 100644 index 000000000..82fa9f5b8 --- /dev/null +++ b/demo/examples/petstore-beta.yaml @@ -0,0 +1,1208 @@ +openapi: 3.0.0 +servers: + - url: //petstore.swagger.io/v2 + description: Default server + - url: //petstore.swagger.io/sandbox + description: Sandbox server +info: + description: | + This is a sample server Petstore server. + You can find out more about Swagger at + [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). + For this sample, you can use the api key `special-key` to test the authorization filters. + + ## Introduction + This API is documented in **OpenAPI format** and is based on + [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. + It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) + tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + + ## OpenAPI Specification + This API is documented in **OpenAPI format** and is based on + [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team. + It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo) + tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard + OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/master/docs/redoc-vendor-extensions.md). + + ## Cross-Origin Resource Sharing + This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). + And that allows cross-domain communication from the browser. + All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site. + + ## Authentication + + Petstore offers two forms of authentication: + - API Key + - OAuth2 + OAuth2 - an open protocol to allow secure authorization in a simple + and standard method from web, mobile and desktop applications. + + + + version: beta + 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" +externalDocs: + description: Find out how to create Github repo for your OpenAPI spec. + url: "https://github.com/Rebilly/generator-openapi-repo" +tags: + - name: pet + description: Everything about your Pets + x-displayName: Pets + - name: store + description: Access to Petstore orders + x-displayName: Petstore Orders + - name: user + description: Operations about user + x-displayName: Users + - name: pet_model + x-displayName: The Pet Model + description: | + + - name: store_model + x-displayName: The Order Model + description: | + +x-tagGroups: + - name: General + tags: + - pet + - store + - name: User Management + tags: + - user + - name: Models + tags: + - pet_model + - store_model +paths: + /pet: + parameters: + - name: Accept-Language + in: header + description: "The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US" + example: en-US + required: false + schema: + type: string + default: en-AU + - name: cookieParam + in: cookie + description: Some cookie + required: true + schema: + type: integer + format: int64 + post: + tags: + - pet + summary: Add a new pet to the store + 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(); + pet.setApiKey("your api key"); + pet.petType = PetStore.v1.Pet.TYPE_DOG; + pet.name = "Rex"; + // set other fields + PetStoreResponse response = pet.create(); + if (response.statusCode == HttpStatusCode.Created) + { + // Successfully created + } + else + { + // Something wrong -- check response for errors + Console.WriteLine(response.getRawResponse()); + } + - lang: PHP + source: | + $form = new \PetStore\Entities\Pet(); + $form->setPetType("Dog"); + $form->setName("Rex"); + // set other fields + try { + $pet = $client->pets()->create($form); + } catch (UnprocessableEntityException $e) { + var_dump($e->getErrors()); + } + requestBody: + $ref: "#/components/requestBodies/Pet" + put: + tags: + - pet + summary: Update an existing pet + description: "" + operationId: updatePet + responses: + "400": + description: Invalid ID supplied + "404": + description: Pet not found + "405": + description: Validation exception + security: + - petstore_auth: + - "write:pets" + - "read:pets" + x-codeSamples: + - lang: PHP + source: | + $form = new \PetStore\Entities\Pet(); + $form->setPetId(1); + $form->setPetType("Dog"); + $form->setName("Rex"); + // set other fields + try { + $pet = $client->pets()->update($form); + } catch (UnprocessableEntityException $e) { + var_dump($e->getErrors()); + } + requestBody: + $ref: "#/components/requestBodies/Pet" + "/pet/{petId}": + get: + tags: + - pet + summary: Find pet by ID + 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: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid ID supplied + "404": + description: Pet not found + security: + - api_key: [] + post: + tags: + - pet + summary: Updates a pet in the store with form data + description: "" + operationId: updatePetWithForm + parameters: + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + responses: + "405": + description: Invalid input + security: + - petstore_auth: + - "write:pets" + - "read:pets" + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + description: Updated name of the pet + type: string + status: + description: Updated status of the pet + type: string + delete: + tags: + - pet + summary: Deletes a 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" + "/pet/{petId}/uploadImage": + post: + tags: + - pet + summary: uploads an image + 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: + $ref: "#/components/schemas/ApiResponse" + security: + - petstore_auth: + - "write:pets" + - "read:pets" + requestBody: + content: + application/octet-stream: + schema: + type: string + format: binary + /pet/findByStatus: + get: + tags: + - pet + summary: Finds Pets by status + 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: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + type: array + items: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid status value + security: + - petstore_auth: + - "write:pets" + - "read:pets" + /pet/findByTags: + get: + tags: + - pet + summary: Finds Pets by tags + 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: + $ref: "#/components/schemas/Pet" + application/xml: + schema: + type: array + items: + $ref: "#/components/schemas/Pet" + "400": + description: Invalid tag value + security: + - petstore_auth: + - "write:pets" + - "read:pets" + /store/inventory: + get: + tags: + - store + summary: Returns pet inventories by status + 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: [] + /store/order: + post: + tags: + - store + summary: Place an order for a pet + description: "" + operationId: placeOrder + responses: + "200": + description: successful operation + content: + application/json: + schema: + $ref: "#/components/schemas/Order" + application/xml: + schema: + $ref: "#/components/schemas/Order" + "400": + description: Invalid Order + content: + application/json: + example: + status: 400 + message: "Invalid Order" + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Order" + description: order placed for purchasing the pet + required: true + "/store/order/{orderId}": + get: + tags: + - store + summary: Find purchase order by ID + 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: + $ref: "#/components/schemas/Order" + application/xml: + schema: + $ref: "#/components/schemas/Order" + "400": + description: Invalid ID supplied + "404": + description: Order not found + delete: + tags: + - store + summary: Delete purchase order by ID + 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 + /store/subscribe: + post: + tags: + - store + summary: Subscribe to the Store events + description: Add subscription for a store events + requestBody: + content: + application/json: + schema: + type: object + properties: + callbackUrl: + type: string + format: uri + description: This URL will be called by the server when the desired event will occur + example: https://myserver.com/send/callback/here + eventName: + type: string + description: Event name for the subscription + enum: + - orderInProgress + - orderShipped + - orderDelivered + example: orderInProgress + required: + - callbackUrl + - eventName + responses: + "201": + description: Subscription added + content: + application/json: + schema: + type: object + properties: + subscriptionId: + type: string + example: AAA-123-BBB-456 + callbacks: + orderInProgress: + "{$request.body#/callbackUrl}?event={$request.body#/eventName}": + servers: + - url: //callback-url.path-level/v1 + description: Path level server 1 + - url: //callback-url.path-level/v2 + description: Path level server 2 + post: + summary: Order in Progress (Summary) + description: A callback triggered every time an Order is updated status to "inProgress" (Description) + externalDocs: + description: Find out more + url: "https://more-details.com/demo" + requestBody: + content: + application/json: + schema: + type: object + properties: + orderId: + type: string + example: "123" + timestamp: + type: string + format: date-time + example: "2018-10-19T16:46:45Z" + status: + type: string + example: "inProgress" + application/xml: + schema: + type: object + properties: + orderId: + type: string + example: "123" + example: | + + + 123 + inProgress + 2018-10-19T16:46:45Z + + responses: + "200": + description: Callback successfully processed and no retries will be performed + content: + application/json: + schema: + type: object + properties: + someProp: + type: string + example: "123" + "299": + description: Response for cancelling subscription + "500": + description: Callback processing failed and retries will be performed + x-codeSamples: + - lang: "C#" + source: | + PetStore.v1.Pet pet = new PetStore.v1.Pet(); + pet.setApiKey("your api key"); + pet.petType = PetStore.v1.Pet.TYPE_DOG; + pet.name = "Rex"; + // set other fields + PetStoreResponse response = pet.create(); + if (response.statusCode == HttpStatusCode.Created) + { + // Successfully created + } + else + { + // Something wrong -- check response for errors + Console.WriteLine(response.getRawResponse()); + } + - lang: PHP + source: | + $form = new \PetStore\Entities\Pet(); + $form->setPetType("Dog"); + $form->setName("Rex"); + // set other fields + try { + $pet = $client->pets()->create($form); + } catch (UnprocessableEntityException $e) { + var_dump($e->getErrors()); + } + put: + description: Order in Progress (Only Description) + servers: + - url: //callback-url.operation-level/v1 + description: Operation level server 1 (Operation override) + - url: //callback-url.operation-level/v2 + description: Operation level server 2 (Operation override) + requestBody: + content: + application/json: + schema: + type: object + properties: + orderId: + type: string + example: "123" + timestamp: + type: string + format: date-time + example: "2018-10-19T16:46:45Z" + status: + type: string + example: "inProgress" + application/xml: + schema: + type: object + properties: + orderId: + type: string + example: "123" + example: | + + + 123 + inProgress + 2018-10-19T16:46:45Z + + responses: + "200": + description: Callback successfully processed and no retries will be performed + content: + application/json: + schema: + type: object + properties: + someProp: + type: string + example: "123" + orderShipped: + "{$request.body#/callbackUrl}?event={$request.body#/eventName}": + post: + description: | + Very long description + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis + nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu + fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in + culpa qui officia deserunt mollit anim id est laborum. + requestBody: + content: + application/json: + schema: + type: object + properties: + orderId: + type: string + example: "123" + timestamp: + type: string + format: date-time + example: "2018-10-19T16:46:45Z" + estimatedDeliveryDate: + type: string + format: date-time + example: "2018-11-11T16:00:00Z" + responses: + "200": + description: Callback successfully processed and no retries will be performed + orderDelivered: + "http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}": + post: + deprecated: true + summary: Order delivered + description: A callback triggered every time an Order is delivered to the recipient + requestBody: + content: + application/json: + schema: + type: object + properties: + orderId: + type: string + example: "123" + timestamp: + type: string + format: date-time + example: "2018-10-19T16:46:45Z" + responses: + "200": + description: Callback successfully processed and no retries will be performed + /user: + post: + tags: + - user + summary: Create user + description: This can only be done by the logged in user. + operationId: createUser + responses: + default: + description: successful operation + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Created user object + required: true + "/user/{username}": + get: + tags: + - user + summary: Get user by user name + 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: + $ref: "#/components/schemas/User" + application/xml: + schema: + $ref: "#/components/schemas/User" + "400": + description: Invalid username supplied + "404": + description: User not found + put: + tags: + - user + summary: Updated user + description: This can only be done by the logged in user. + operationId: updateUser + parameters: + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string + responses: + "400": + description: Invalid user supplied + "404": + description: User not found + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/User" + description: Updated user object + required: true + delete: + tags: + - user + summary: Delete 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 + /user/createWithArray: + post: + tags: + - user + summary: Creates list of users with given input array + description: "" + operationId: createUsersWithArrayInput + responses: + default: + description: successful operation + requestBody: + $ref: "#/components/requestBodies/UserArray" + /user/createWithList: + post: + tags: + - user + summary: Creates list of users with given input list + description: "" + operationId: createUsersWithListInput + responses: + default: + description: successful operation + requestBody: + $ref: "#/components/requestBodies/UserArray" + /user/login: + get: + tags: + - user + summary: Logs user into the system + 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 + /user/logout: + get: + tags: + - user + summary: Logs out current logged in user session + description: "" + operationId: logoutUser + responses: + default: + description: successful operation +components: + schemas: + ApiResponse: + type: object + properties: + code: + type: integer + format: int32 + type: + type: string + message: + type: string + Cat: + description: A representation of a cat + allOf: + - $ref: "#/components/schemas/Pet" + - type: object + properties: + huntingSkill: + type: string + description: The measured skill for hunting + default: lazy + example: adventurous + enum: + - clueless + - lazy + - adventurous + - aggressive + required: + - huntingSkill + Category: + type: object + properties: + id: + description: Category ID + allOf: + - $ref: "#/components/schemas/Id" + 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 + Dog: + description: A representation of a dog + allOf: + - $ref: "#/components/schemas/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 + HoneyBee: + description: A representation of a honey bee + allOf: + - $ref: "#/components/schemas/Pet" + - type: object + properties: + honeyPerDay: + type: number + description: Average amount of honey produced per day in ounces + example: 3.14 + multipleOf: .01 + required: + - honeyPerDay + Id: + type: integer + format: int64 + readOnly: true + Order: + type: object + properties: + id: + description: Order ID + allOf: + - $ref: "#/components/schemas/Id" + petId: + description: Pet ID + allOf: + - $ref: "#/components/schemas/Id" + 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 + Pet: + type: object + required: + - name + - photoUrls + discriminator: + propertyName: petType + mapping: + cat: "#/components/schemas/Cat" + dog: "#/components/schemas/Dog" + bee: "#/components/schemas/HoneyBee" + properties: + id: + externalDocs: + description: "Find more info here" + url: "https://example.com" + description: Pet ID + allOf: + - $ref: "#/components/schemas/Id" + category: + description: Categories this pet belongs to + allOf: + - $ref: "#/components/schemas/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: + - $ref: "#/components/schemas/Pet" + tags: + description: Tags attached to the pet + type: array + minItems: 1 + xml: + name: tag + wrapped: true + items: + $ref: "#/components/schemas/Tag" + status: + type: string + description: Pet status in the store + enum: + - available + - pending + - sold + petType: + description: Type of a pet + type: string + xml: + name: Pet + Tag: + type: object + properties: + id: + description: Tag ID + allOf: + - $ref: "#/components/schemas/Id" + name: + description: Tag name + type: string + minLength: 1 + xml: + name: Tag + User: + type: object + properties: + id: + $ref: "#/components/schemas/Id" + pet: + oneOf: + - $ref: "#/components/schemas/Pet" + - $ref: "#/components/schemas/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 + requestBodies: + Pet: + content: + application/json: + schema: + allOf: + - description: My Pet + title: Pettie + - $ref: "#/components/schemas/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 + UserArray: + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/User" + description: List of user object + required: true + securitySchemes: + petstore_auth: + description: | + Get access to data while protecting your account credentials. + OAuth2 is also a safer and more secure way to give you access. + 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. + type: apiKey + name: api_key + in: header + examples: + Order: + value: + quantity: 1 + shipDate: "2018-10-19T16:46:45Z" + status: placed + complete: false +x-webhooks: + newPet: + post: + summary: New pet + description: Information about a new pet in the systems + operationId: newPet + tags: + - pet + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/Pet" + responses: + "200": + description: Return a 200 status to indicate that the data was received successfully diff --git a/demo/examples/petstore.yaml b/demo/examples/petstore.yaml index a0aaebd04..c4bfed138 100644 --- a/demo/examples/petstore.yaml +++ b/demo/examples/petstore.yaml @@ -40,7 +40,7 @@ info: - version: 1.0.0 + version: 2.0.0 title: Swagger Petstore YAML termsOfService: "http://swagger.io/terms/" contact: From b9f917e15e8eea69761f55eb4875acedf7d712e3 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 18:49:30 -0500 Subject: [PATCH 09/20] Update sidebars --- demo/sidebars.js | 99 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 85 insertions(+), 14 deletions(-) diff --git a/demo/sidebars.js b/demo/sidebars.js index 2138973c2..923b2e868 100644 --- a/demo/sidebars.js +++ b/demo/sidebars.js @@ -8,11 +8,18 @@ Create as many sidebars as you want. */ +const petstoreVersions = require("./docs/petstore_versioned/versions.json"); +const versionSelector = + require("docusaurus-plugin-openapi-docs/lib/sidebars/utils").default; const sidebars = { - // By default, Docusaurus generates a sidebar from the docs folder structure - tutorialSidebar: [{ type: "autogenerated", dirName: "." }], - openApiSidebar: [ + tutorialSidebar: [ + { + type: "doc", + id: "intro", + }, + ], + petstore: [ { type: "category", label: "Petstore", @@ -37,31 +44,95 @@ const sidebars = { }, { type: "category", - label: "Food", + label: "Burgers", link: { type: "generated-index", - title: "Food APIs", - slug: "/category/food-apis", + title: "Burger API", + slug: "/category/food-api", }, items: [ { type: "autogenerated", - dirName: "food", + dirName: "food/burgers", // '.' means the current docs folder + }, + ], + }, + { + type: "category", + label: "Yogurt Store", + link: { + type: "generated-index", + title: "Yogurt Store API", + slug: "/category/yogurt-api", + }, + items: [ + { + type: "autogenerated", + dirName: "food/yogurtstore", // '.' means the current docs folder }, ], }, ], - // But you can create a sidebar manually - /* - tutorialSidebar: [ + "petstore-2.0.0": [ { - type: 'category', - label: 'Tutorial', - items: ['hello'], + type: "html", + defaultStyle: true, + value: versionSelector(petstoreVersions), + }, + { + type: "category", + label: "Petstore", + link: { + type: "generated-index", + title: "Petstore API (latest)", + description: + "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", + slug: "/category/petstore-versioned-api", + }, + items: require("./docs/petstore_versioned/sidebar.js"), + }, + ], + + "petstore-1.0.0": [ + { + type: "html", + defaultStyle: true, + value: versionSelector(petstoreVersions), + }, + { + type: "category", + label: "Petstore (1.0.0)", + link: { + type: "generated-index", + title: "Petstore API (1.0.0)", + description: + "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", + slug: "/category/petstore-api-1.0.0", + }, + items: require("./docs/petstore_versioned/1.0.0/sidebar.js"), + }, + ], + + "petstore-beta": [ + { + type: "html", + defaultStyle: true, + value: versionSelector(petstoreVersions), + }, + { + type: "category", + label: "Petstore (beta)", + link: { + type: "generated-index", + title: "Petstore API (beta)", + description: + "This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.", + slug: "/category/petstore-api-beta", + }, + items: require("./docs/petstore_versioned/beta/sidebar.js"), }, ], - */ }; module.exports = sidebars; From 0a19a750bc03c27fb5ed34441abcfae53f33e458 Mon Sep 17 00:00:00 2001 From: Steven Serrata <9343811+sserrata@users.noreply.github.com> Date: Wed, 8 Jun 2022 21:26:48 -0500 Subject: [PATCH 10/20] Style version selector as block btn --- .../docusaurus-plugin-openapi-docs/src/sidebars/utils.ts | 6 +++--- .../src/theme/ApiItem/styles.module.css | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/docusaurus-plugin-openapi-docs/src/sidebars/utils.ts b/packages/docusaurus-plugin-openapi-docs/src/sidebars/utils.ts index 870f196e5..a90fdd3bc 100644 --- a/packages/docusaurus-plugin-openapi-docs/src/sidebars/utils.ts +++ b/packages/docusaurus-plugin-openapi-docs/src/sidebars/utils.ts @@ -8,10 +8,10 @@ import { render } from "mustache"; export default function generateDropdownHtml(versions: object[]) { - const template = `