[
  {
    "path": ".dockerignore",
    "content": "*\n!src/\n!config\n!demo/favicon.png\n\n!custom.d.ts\n!typings/styled-patch.d.ts\n!tsconfig.json\n!webpack.config.ts\n\n!package.json\n!package-lock.json\n"
  },
  {
    "path": ".editorconfig",
    "content": "root = true\n\n[*]\nend_of_line = lf\ncharset = utf-8\ntrim_trailing_whitespace = true\ninsert_final_newline = true\nindent_style = space\nindent_size = 2\ntrim_trailing_whitespace = true\n"
  },
  {
    "path": ".eslintrc.js",
    "content": "module.exports = {\n  env: {\n    browser: true,\n  },\n  parser: '@typescript-eslint/parser',\n  extends: ['plugin:react/recommended', 'plugin:@typescript-eslint/recommended'],\n  parserOptions: {\n    project: 'tsconfig.json',\n    sourceType: 'module',\n    createDefaultProgram: true,\n    ecmaFeatures: {\n      jsx: true,\n    },\n  },\n  settings: {\n    react: {\n      version: 'detect',\n    },\n  },\n  plugins: ['react', 'react-hooks', '@typescript-eslint', 'import'],\n  rules: {\n    '@typescript-eslint/explicit-function-return-type': 'off',\n    '@typescript-eslint/explicit-module-boundary-types': 'off',\n    '@typescript-eslint/no-explicit-any': 'off',\n    '@typescript-eslint/no-use-before-define': 'off',\n    '@typescript-eslint/interface-name-prefix': 'off',\n    '@typescript-eslint/no-inferrable-types': 'off',\n    '@typescript-eslint/no-non-null-assertion': 'off',\n    '@typescript-eslint/ban-ts-ignore': 'off',\n    '@typescript-eslint/ban-types': ['error', { types: { object: false }, extendDefaults: true }],\n    '@typescript-eslint/no-var-requires': 'off',\n\n    'react/prop-types': 'off',\n    'react-hooks/rules-of-hooks': 'error',\n    'react-hooks/exhaustive-deps': 'warn',\n\n    'import/no-extraneous-dependencies': 'error',\n    'import/no-internal-modules': [\n      'error',\n      {\n        allow: [\n          'prismjs/**',\n          'perfect-scrollbar/**',\n          'react-dom/*',\n          'core-js/**',\n          'memoize-one/**',\n          'unfetch/**',\n          'raf/polyfill',\n          '**/fixtures/**', // for tests\n        ],\n      },\n    ],\n  },\n};\n"
  },
  {
    "path": ".github/CODEOWNERS",
    "content": "* @Redocly/keyboard-warriors\n/docs/ @Redocly/technical-writers"
  },
  {
    "path": ".github/CONTRIBUTING.md",
    "content": "# Redoc Contributing Guide\n\nHi! We're really excited that you are interested in contributing to Redoc. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.\n\n- [Redoc Contributing Guide](#redoc-contributing-guide)\n  - [Issue Reporting Guidelines](#issue-reporting-guidelines)\n  - [Pull Request Guidelines](#pull-request-guidelines)\n  - [Development Setup](#development-setup)\n    - [Commonly used NPM scripts](#commonly-used-npm-scripts)\n  - [Project Structure](#project-structure)\n\n## Issue Reporting Guidelines\n- Before filing a new issue, try to make sure your problem doesn’t already exist.\n- The best way to get your bug fixed is to provide a reduced test case.\n\n## Pull Request Guidelines\nBefore submitting a pull request, please make sure the following is done:\n\n1. Fork the repository and create your branch from main.\n2. Run `npm install` in the repository root.\n3. If you’ve fixed a bug or added code that should be tested, add tests!\n4. Ensure the test suite passes (`npm test`). Tip: `npm test -- --watch TestName` is helpful in development.\n5. Format your code with prettier (`npm run prettier`).\n\n## Development Setup\n\nYou need [Node.js](http://nodejs.org) at `v12.0.0+`.\n\nAfter cloning the repo, run:\n\n```bash\n$ npm install # or npm\n```\n\n### Commonly used NPM scripts\n\n``` bash\n# dev-server, watch and auto reload playground\n$ npm start\n\n# start playground app in production environment\n$ npm run start:prod\n\n# runt tslint\n$ npm run lint\n\n# try autofix tslint issues\n$ npm run lint -- --fix\n\n# run unit tests\n$ npm run unit\n\n# run e2e tests\n$ npm run e2e\n# Make sure you have created bundle before running e2e test\n# E.g. run `npm run bundle` and wait for the finishing process.\n\n# open cypress UI to debug e2e test\n$ npm run cy:open\n\n# run the unit tests (includes linting and license checks)\n$ npm test\n\n# prepare bundles\n$ npm run bundle\n\n# format the code using prettier\n$ npm run prettier\n\n# auto-generate changelog\n$ npm run changelog\n```\n\nThere are some other scripts available in the `scripts` section of the `package.json` file.\n\n## Project Structure\n\n- **`benchmark`**: contains basic perf benchmark. Not fully ready yet\n\n- **`demo`**: contains project demo with demo specs and HMR playground used in development\n\n  - `demo/playground`: HMR Playground used in development\n\n- **`docs`**: contains extra docs (linked from README.md)\n\n- **`e2e`**: contains e2e tests. The e2e tests are written and run with [Cypress](https://www.cypress.io/).\n\n\n- **`src`**: contains the source code. The codebase is written in Typescript. CSS styles are managed with [Styled components](https://www.styled-components.com/). State is managed by [MobX](https://github.com/mobxjs/mobx)\n\n  - **`src/common-elements`**: contains common Styled elements or components used in multiple places\n  - **`src/components`**: contains main visual components\n  - **`src/services`**: contains different services used by Redoc including MobX stores\n  - **`src/services/models`**: contains classes for OpenAPI entities (e.g. Response, Operations, etc)\n  - **`src/types`**: contains extra typescript typings including OpenAPI doc typings\n  - **`src/utils`**: utility functions\n  - **`src/styled-components.ts`**: - reexports styled-components with proper typescript annotations using theme\n  - **`src/theme.ts`**: - default theme (colors, fonts, etc) used by all the components\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "content": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: 'Type: Bug'\nassignees: ''\n\n---\n\n**Describe the bug**\nA clear and concise description of what the bug is.\n\n**Expected behavior**\nA clear and concise description of what you expected to happen.\n\n**Minimal reproducible OpenAPI snippet(if possible)**\n\n**Screenshots**\nIf applicable, add screenshots to help explain your problem.\n\n**Additional context**\nAdd any other context about the problem here.\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "content": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: 'Type: Enhancement'\nassignees: ''\n\n---\n\n**Describe the problem to be solved**\nA clear and concise description of what problem to be solved\n\n**Describe the solution you'd like**\nA clear and concise description of what you want to happen.\n\n**Describe alternatives you've considered**\nA clear and concise description of any alternative solutions or features you've considered.\n\n**Additional context**\nAdd any other context or screenshots about the feature request here.\n"
  },
  {
    "path": ".github/pull_request_template.md",
    "content": "## What/Why/How?\n\n## Reference\n\n## Tests\n\n## Screenshots (optional)\n\n## Check yourself\n\n- [ ] Code is linted\n- [ ] Tested\n- [ ] All new/updated code is covered with tests\n"
  },
  {
    "path": ".github/styles/Rules/BritishEnglish.yml",
    "content": "extends: substitution\nmessage: 'Use the US spelling \"%s\" instead of British \"%s\".'\nlink: https://docs.microsoft.com/en-us/style-guide/word-choice/use-us-spelling-avoid-non-english-words\nlevel: error\nignorecase: true\nswap:\n  aeon: eon\n  aeroplane: airplane\n  ageing: aging\n  aluminium: aluminum\n  anaemia: anemia\n  anaesthesia: anesthesia\n  analyse: analyze\n  annexe: annex\n  apologise: apologize\n  behaviour: behavior\n  busses: buses\n  calibre: caliber\n  cancelled: canceled\n  cancellation: cancelation\n  catalogue: catalog\n  categorise: categorize\n  categorised: categorized\n  categorises: categorizes\n  categorising: categorizing\n  centre: center\n  cheque: check\n  civilisation: civilization\n  civilise: civilize\n  colour: color\n  cosy: cozy\n  cypher: cipher\n  dependant: dependent\n  defence: defense\n  distil: distill\n  draught: draft\n  encyclopaedia: encyclopedia\n  enquiry: inquiry\n  enrol: enroll\n  enrolment: enrollment\n  enthral: enthrall\n  expiry: expiration\n  favourite: favorite\n  fibre: fiber\n  fillet: filet\n  flavour: flavor\n  furore: furor\n  fulfil: fulfill\n  gaol: jail\n  grey: gray\n  humour: humor\n  honour: honor\n  initialled: initialed\n  initialling: initialing\n  instil: instill\n  jewellery: jewelry\n  labelling: labeling\n  labelled: labeled\n  labour: labor\n  libellous: libelous\n  licence: license\n  likeable: likable\n  liveable: livable\n  lustre: luster\n  manoeuvre: maneuver\n  marvellous: marvelous\n  matt: matte\n  meagre: meager\n  metre: meter\n  modelling: modeling\n  moustache: mustache\n  neighbour: neighbor\n  normalise: normalize\n  offence: offense\n  organise: organize\n  organisation: organization\n  orientated: oriented\n  paralyse: paralyze\n  plough: plow\n  pretence: pretense\n  programme: program\n  pyjamas: pajamas\n  rateable: ratable\n  realise: realize\n  recognise: recognize\n  reconnoitre: reconnoiter\n  rumour: rumor\n  sabre: saber\n  saleable: salable\n  saltpetre: saltpeter\n  sceptic: skeptic\n  sepulchre: sepulcher\n  signalling: signaling\n  sizeable: sizable\n  skilful: skillful\n  sombre: somber\n  smoulder: smolder\n  speciality: specialty\n  spectre: specter\n  splendour: splendor\n  standardise: standardize\n  standardised: standardized\n  sulphur: sulfur\n  theatre: theater\n  travelled: traveled\n  traveller: traveler\n  travelling: traveling\n  unshakeable: unshakable\n  wilful: willful\n  yoghurt: yogurt\n"
  },
  {
    "path": ".github/styles/Rules/FutureTense.yml",
    "content": "extends: existence\nmessage: 'Avoid using future tense: \"%s\". Use present tense instead.'\nlink: https://intranet.redoc.ly/contributing/documentation-style-guide/#tone-and-audience\nignorecase: true\nlevel: error\nraw:\n  - \"(going to( |\\n|[[:punct:]])[a-zA-Z]*|\"\n  - \"will( |\\n|[[:punct:]])[a-zA-Z]*|\"\n  - \"won't( |\\n|[[:punct:]])[a-zA-Z]*|\"\n  - \"[a-zA-Z]*'ll( |\\n|[[:punct:]])[a-zA-Z]*)\"\n"
  },
  {
    "path": ".github/styles/Rules/HeaderGerunds.yml",
    "content": "extends: existence\nmessage: 'Do not start headings with with a gerund (ing word). Use an imperative verb instead.'\nlink: https://intranet.redoc.ly/contributing/documentation-style-guide/#content-organization\nlevel: error\nscope: heading\ntokens:\n  - '^\\w*ing.*'\nexceptions:\n  - expandSingleSchemaField\n  - hideLoading\n  - hideSingleRequestSampleTab\n"
  },
  {
    "path": ".github/styles/Rules/InclusionGenderCulture.yml",
    "content": "extends: substitution\nmessage: 'Use inclusive language. Consider \"%s\" instead of \"%s\".'\nlink: https://intranet.redoc.ly/contributing/documentation-style-guide/#grammar-and-syntax\nlevel: error\nignorecase: true\nswap:\n  he: they\n  his: their\n  she: they\n  hers: their\n  blacklist(?:ed|ing|s)?: blocklist\n  whitelist(?:ed|ing|s)?: allowlist\n  master: primary, main\n  slave: replica\n  he/she: they\n  s/he: they\n"
  },
  {
    "path": ".github/styles/Rules/OxfordComma.yml",
    "content": "extends: existence\nmessage: \"Use the Oxford comma in '%s'.\"\nlink: https://docs.microsoft.com/en-us/style-guide/punctuation/commas\nscope: sentence\nlevel: error\nnonword: true\ntokens:\n  - '(?:[^\\s,]+,){1,} \\w+ (?:and|or) \\w+[.?!]'\n"
  },
  {
    "path": ".github/styles/config/vocabularies/Rules/accept.txt",
    "content": "[Aa]nsible\n[Aa]utostart\n[Bb]locklist\n[Bb]locklists\n[Bb]oolean\n[Bb]reakpoint\n[B]reakpoints\n[Cc]ancelation\n[Cc]lassloading\n[Cc]hargeback\n[Cc]hargebacks\n[Cc]he\n[Cc]rypto\n[Cc]ryptocurrency\n[Dd]evfile|[Dd]evfiles\n[Dd]ownstream\n[Dd]ownstreaming\n[Ff]actories|[Ff]actory\n[Gg]it\n[Gg]rafana\n[Hh]eatmap\n[Hh]elm\n[Hh]ostname\n[Ii]tem\n[Jj]etbrains\n[Kk]eycloak\n[Ll]iveness\n[Ll]ombok\n[Ll]oopback\n[Mm]aven\n[Mm]inikube\n[Mm]inishift\n[Mm]ixin|[Mm]ixins\n[Mm]odularization\n[Mm]ulticluster\n[Mm]ultihost\n[Mm]ultinode\n[Mm]ultitenant\n[Mm]ultiuser\n[Mm]ultizone\n[Nn]amespace|[Nn]amespaces\n[Nn]etcoredebug[Oo]utput\n[Nn]ginx\n[Oo]nboarding\n[Pp]podman\n[Pp]reconfigured\n[Rr]eadonly\n[Rr]epresentment\n[Rr]ollout|[Rr]ollouts\n[Rr]untime|[Rr]untimes\n[Ss]erializer\n[Ss]erverless\n[Ss]ubnetwork\n[Ss]ubpath|[Ss]ubpaths\n[Tt]heia\n[Tt]olerations\n[Tt]ruststore\n[Uu]ninstallation\n[Uu]nstaged\n[Uu]ntrusted\n[Ww]orkspace|[Ww]orkspaces\n[Yy]eoman\n\\.NET\nadoc\nAntora\nAPI\nApigee\nAsciiDoc\nAWS|aws\nAzure\nBierner\nBitbucket\nbtn\nBtrfs\nCentOS\nCeph\nChe-Theia\nCLI\nConfigMap|ConfigMaps\nCtrl\nDaemonSet\nDev Workspace\nDeveloper Perspective\nDNS\nDocker\nDockerfile\nDotnet\nEndevor\nendif\nGitHub|github\nGitLab\nGluster\nGradle\nGrafana\nGUI\nHTTPS|https\nI/O\nIDE|ide|IDEs\nIntelephense\nIntelliJ IDEA\nJava\nJava Lombok\nJSON|json\nJVM|jvm\nkbd\nKubespray\nLaravel\nLet\\'s Encrypt\nMattermost\nmebibytes\nMicrosoft Azure\nmillicores\nMulesoft\nMySQL\nNetlify\nNode.js\nnpm\nNuGet\nOAuth\nocp\nOmniSharp\nOpenShift\nOpenTracing\nOperator\nOperatorHub\nOpenAPI\nosd\nPHP\nPostgreSQL\nQuarkus\nRebilly\nRedoc\nRedocly\nRedocly-cli\nSCM\nSharding\nSonarLint\nSpring Boot\nSVG\nUber\nURI|URIs\nURL|url|URLs\nVelero\nVercel\nVisual Studio Code\nvsix\nWebview|Webviews\nWoopra\nYAML|yaml\nZowe\n"
  },
  {
    "path": ".github/styles/config/vocabularies/Rules/reject.txt",
    "content": ""
  },
  {
    "path": ".github/workflows/docs-tests.yaml",
    "content": "name: Documentation tests\non:\n  pull_request:\n    types: [opened, synchronize, reopened]\n\njobs:\n  markdownlint:\n    name: markdownlint\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: DavidAnson/markdownlint-cli2-action@v15\n        with:\n          config: .markdownlint.yaml\n          globs: |\n            docs/**/*.md\n            README.md\n\n  vale:\n    name: vale action\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: errata-ai/vale-action@reviewdog\n        with:\n          files: '[\"README.md\", \"docs\"]'\n          filter_mode: file\n\n  linkcheck:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout Repository\n        uses: actions/checkout@v4\n      - name: Markup Link Checker (mlc)\n        uses: becheran/mlc@v0.16.1\n        with:\n          args: ./docs\n"
  },
  {
    "path": ".github/workflows/e2e-tests.yml",
    "content": "name: Tests e2e\n\non: [push]\n\njobs:\n  build-and-e2e:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - run: npm ci\n      - run: npm run bundle\n      - run: npm run e2e\n"
  },
  {
    "path": ".github/workflows/main.yml",
    "content": "name: Publish Docker image\non:\n  release:\n    types: [published]\njobs:\n  dockerhub:\n    name: Publish redoc image to DockerHub\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout\n        uses: actions/checkout@v3\n\n      - name: Docker meta\n        id: docker_meta\n        uses: crazy-max/ghaction-docker-meta@v1\n        with:\n          images: redocly/redoc\n\n      - name: Set up QEMU\n        uses: docker/setup-qemu-action@v1\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v1\n\n      - name: Login to DockerHub\n        uses: docker/login-action@v1\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Build and push\n        uses: docker/build-push-action@v3\n        with:\n          context: .\n          file: ./config/docker/Dockerfile\n          platforms: linux/amd64,linux/arm64\n          push: true\n          tags: ${{ steps.docker_meta.outputs.tags }}\n          labels: ${{ steps.docker_meta.outputs.labels }}\n"
  },
  {
    "path": ".github/workflows/publish.yml",
    "content": "name: Publish\n\non:\n  push:\n    branches: [main]\n\njobs:\n  bundle:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - uses: actions/setup-node@v3\n      - name: Cache node modules\n        uses: actions/cache@v3\n        with:\n          path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS\n          key: npm-${{ hashFiles('package-lock.json') }}\n          restore-keys: |\n            npm-${{ hashFiles('package-lock.json') }}\n            npm-\n      - run: npm ci\n      - run: npm run bundle\n      - name: Store bundle artifact\n        uses: actions/upload-artifact@v4\n        with:\n          name: bundles\n          path: bundles\n          retention-days: 1\n  unit-tests:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - run: npm ci\n      - run: npm test\n  e2e-tests:\n    needs: [bundle]\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - run: npm ci\n      - name: Download bundled artifact\n        uses: actions/download-artifact@v4\n        with:\n          name: bundles\n          path: bundles\n      - run: npm run e2e\n  check-version:\n    name: Check Version\n    runs-on: ubuntu-latest\n    needs: [bundle, unit-tests, e2e-tests]\n    outputs:\n      changed: ${{ steps.check.outputs.changed }}\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n      - name: Set up Node.js\n        uses: actions/setup-node@v3\n      - name: Check if version has been updated\n        id: check\n        uses: EndBug/version-check@v2.0.1\n        with:\n          file-url: https://cdn.jsdelivr.net/npm/redoc/package.json\n          static-checking: localIsNew\n  publish:\n    name: Publish to NPM\n    needs: [check-version]\n    if: needs.check-version.outputs.changed == 'true'\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/setup-node@v3\n        with:\n          node-version: '14.x'\n          registry-url: 'https://registry.npmjs.org'\n      - uses: actions/checkout@v3\n      - name: Download bundled artifacts\n        uses: actions/download-artifact@v4\n        with:\n          name: bundles\n          path: bundles\n      - name: Cache node modules\n        uses: actions/cache@v3\n        with:\n          path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS\n          key: npm-${{ hashFiles('package-lock.json') }}\n          restore-keys: |\n            npm-${{ hashFiles('package-lock.json') }}\n            npm-\n      - name: Before deploy\n        run: npm ci && npm run declarations\n      - name: Publish to NPM\n        run: npm publish\n        env:\n          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}\n\n  publish-cdn:\n    name: Publish to CDN\n    needs: [check-version]\n    if: needs.check-version.outputs.changed == 'true'\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n      - name: Configure AWS\n        uses: aws-actions/configure-aws-credentials@v1\n        with:\n          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n          aws-region: us-east-1\n      - name: Download all artifact\n        uses: actions/download-artifact@v4\n      - name: Publish to S3\n        run: npm run publish-cdn\n\n  invalidate-cache:\n    name: Clear cache\n    runs-on: ubuntu-latest\n    needs: [check-version, publish, publish-cdn]\n    if: needs.check-version.outputs.changed == 'true'\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v3\n      - name: Configure AWS\n        uses: aws-actions/configure-aws-credentials@v1\n        with:\n          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n          aws-region: us-east-1\n      - name: Invalidate cache\n        run: ./scripts/invalidate-cache.sh\n        shell: bash\n        env:\n          DISTRIBUTION: ${{ secrets.DISTRIBUTION }}\n"
  },
  {
    "path": ".github/workflows/unit-tests.yml",
    "content": "name: Unit Tests\n\non: [push]\n\njobs:\n  build-and-unit:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      - run: npm ci\n      - run: npm run bundle\n      - run: npm test\n"
  },
  {
    "path": ".gitignore",
    "content": "### Linux ###\n*~\n\n# KDE directory preferences\n.directory\n# OS X folder attributes\n.DS_Store\n\n# Linux trash folder which might appear on any partition or disk\n.Trash-*\n\ndemo/dist/\n\n### Node ###\n# Logs\nlogs\n*.log\nnpm-debug.log*\n\n# Dependency directory\n# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git\nnode_modules\n\nlib/\nstats.json\ncypress/\nbundles/\ntypings/*\n!typings/styled-patch.d.ts\n\n/benchmark/revisions\n\n/coverage\n.ghpages-tmp\nstats.json\nyarn.lock\n.idea\n.vscode\n.eslintcache\n"
  },
  {
    "path": ".husky/pre-commit",
    "content": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpm run pre-commit\n"
  },
  {
    "path": ".markdownlint.yaml",
    "content": "---\n# Default rules: https://github.com/github/super-linter/blob/master/TEMPLATES/.markdown-lint.yml\n\n# Rules by id\n\n# Unordered list style\nMD004: false\n\n# Unordered list indentation\nMD007:\n  indent: 2\n\nMD013:\n  # TODO: Consider to decrease allowed line length\n  line_length: 800\n  tables: false\n\n## Allow same headers in siblings\nMD024:\n  siblings_only: true\n\n# Multiple top level headings in the same document\nMD025:\n  front_matter_title: ''\n\n# Trailing punctuation in heading\nMD026:\n  punctuation: '.,;:。，；:'\n\n# Ordered list item prefix\nMD029: false\n\n# Unordered lists inside of ordered lists\nMD030: false\n\n# Inline HTML\nMD033: false\n\n# No bare urls\nMD034: false\n\n# Emphasis used instead of a heading\nMD036: false\n\n# Disable \"First line in file should be a top level heading\"\n# We use uncommon format to add metadata.\n# TODO: Consider to use \"YAML front matter\".\nMD041: false\n\n# Rules by tags\nblank_lines: false\n\nMD046: false\n# code-block-style\n"
  },
  {
    "path": ".mlc.toml",
    "content": "# Ignore these links, we can't check them from this subproject\nignore-links=[\"../*\", \"/docs/*\"]\n# Path to the root folder used to resolve all relative paths\nroot-dir=\"./docs\"\n"
  },
  {
    "path": ".npmignore",
    "content": "*\n!bundles/*\n!typings/**/*\n!package.json\n!README.md\n!LICENSE"
  },
  {
    "path": ".prettierignore",
    "content": "*.md\n"
  },
  {
    "path": ".vale.ini",
    "content": "# Vale configuration file.\n# See: https://docs.errata.ai/vale/config\n\n# The relative path to the folder containing linting rules (styles).\nStylesPath = .github/styles\n\n# Vocab define the exceptions to use in *all* `BasedOnStyles`.\n# spelling-exceptions.txt triggers `Vale.Terms`\n# reject.txt triggers `Vale.Avoid`\n# See: https://docs.errata.ai/vale/vocab\nVocab = Rules\n\n# Minimum alert level\n# -------------------\n# The minimum alert level in the output (suggestion, warning, or error).\n# If integrated into CI, builds fail by default on error-level alerts, unless you run Vale with the --no-exit flag\nMinAlertLevel = suggestion\n\n# IgnoredScopes specifies inline-level HTML tags to ignore.\n# These tags may occur in an active scope (unlike SkippedScopes, skipped entirely) but their content still won't raise any alerts.\n# Default: ignore `code` and `tt`.\nIgnoredScopes = code, tt, img, url, a, body.id\n# SkippedScopes specifies block-level HTML tags to ignore. Ignore any content in these scopes.\n# Default: ignore `script`, `style`, `pre`, and `figure`.\n# For AsciiDoc: by default, listingblock, and literalblock.\nSkippedScopes = script, style, pre, figure, code, tt, listingblock, literalblock\n\n# Rules for matching file types. See: https://docs.errata.ai/vale/scoping\n\n[formats]\nproperties = md\nmdx = md\n\n# Rules for .MD, .MDX\n[*.{md,mdx}]\n\nBasedOnStyles = Rules\n# Ignore code surrounded by backticks or plus sign, parameters defaults, URLs.\nTokenIgnores = (\\x60[^\\n\\x60]+\\x60), ([^\\n]+=[^\\n]*), (\\+[^\\n]+\\+), (http[^\\n]+\\[)\nVale.Repetition = NO\nVale.SentenceSpacing = NO\nVale.Spelling = NO\n\n# /End of rules for .MD, .MDX\n\n\n# Process .ini files\n[*.ini]\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# [2.5.2](https://github.com/Redocly/redoc/compare/v2.5.1...v2.5.2) (2025-10-15)\n\n\n### Bug Fixes\n\n* Bumped `openapi-sampler` dependency to include the fix for `readOnly`/`writeOnly` handling in allOf.\n\n\n# [2.5.1](https://github.com/Redocly/redoc/compare/v2.4.0...v2.5.1) (2025-09-26)\n\n\n### Bug Fixes\n\n* Bumped `mobx-react` dependency to address a security vulnerability.\n\n# [2.5.0](https://github.com/Redocly/redoc/compare/v2.4.0...v2.5.0) (2025-04-14)\n\n\n### Bug Fixes\n\n* enhance accessibility for menu items with keyboard support ([#2655](https://github.com/Redocly/redoc/issues/2655)) ([2db293b](https://github.com/Redocly/redoc/commit/2db293bfb2973497dd33f31dc99e97f5bb90bbe8))\n\n\n### Features\n\n* add keyboard navigation support to JsonViewer component ([#2654](https://github.com/Redocly/redoc/issues/2654)) ([1b4126f](https://github.com/Redocly/redoc/commit/1b4126fde4531387f49c90f52efbd0c0e5f7b6ea))\n\n\n\n# [2.4.0](https://github.com/Redocly/redoc/compare/v2.3.0...v2.4.0) (2025-02-07)\n\n\n### Bug Fixes\n\n* Prototype Pollution Vulnerability Affecting redoc <=2.2.0 ([#2638](https://github.com/Redocly/redoc/issues/2638)) ([153ec7a](https://github.com/Redocly/redoc/commit/153ec7a0b7245639f404c0b038b612ae7377c7db))\n* unify redoc config ([#2647](https://github.com/Redocly/redoc/issues/2647)) ([53a6afc](https://github.com/Redocly/redoc/commit/53a6afc59624fe4591b0a0f1f20f41c0fbb5f1cf))\n\n\n### Features\n\n* add supporting react 19 in package.json ([#2652](https://github.com/Redocly/redoc/issues/2652)) ([3a74802](https://github.com/Redocly/redoc/commit/3a748022be3a7dc7f98669e1645dd5cda72f1abc))\n\n\n\n# [2.3.0](https://github.com/Redocly/redoc/compare/v2.2.0...v2.3.0) (2025-01-16)\n\n\n### Bug Fixes\n\n* displaying json example when showObjectSchemaExamples enabled ([#2635](https://github.com/Redocly/redoc/issues/2635)) ([59ee73f](https://github.com/Redocly/redoc/commit/59ee73fefa8e8edb398940076bdd721fc284caa3))\n* displaying nested items with type string ([#2634](https://github.com/Redocly/redoc/issues/2634)) ([85b622f](https://github.com/Redocly/redoc/commit/85b622fc581eb96303aeb85056aef36c74ea9f9d))\n* passing inline parameters after support react 18 for response title ([#2640](https://github.com/Redocly/redoc/issues/2640)) ([d614d2d](https://github.com/Redocly/redoc/commit/d614d2d022df8bd1989cb0eaf76d087b52120d36))\n\n\n### Features\n\n* update pattern styling ([#2196](https://github.com/Redocly/redoc/issues/2196)) ([#2600](https://github.com/Redocly/redoc/issues/2600)) ([aa0879c](https://github.com/Redocly/redoc/commit/aa0879ca0235112918428fdff8f4c48d2c6c4adf))\n\n\n\n# [2.2.0](https://github.com/Redocly/redoc/compare/v2.1.5...v2.2.0) (2024-10-16)\n\n\n### Bug Fixes\n\n* show siblings schema with oneOf ([#2576](https://github.com/Redocly/redoc/issues/2576)) ([60d131b](https://github.com/Redocly/redoc/commit/60d131b0a9dab4710e900323c9ba81160cecf7d8))\n\n\n### Features\n\n* add support x-badges ([#2605](https://github.com/Redocly/redoc/issues/2605)) ([64f1877](https://github.com/Redocly/redoc/commit/64f18779e5fe7e03f25862463cbc5062e85c867c))\n\n\n\n## [2.1.5](https://github.com/Redocly/redoc/compare/v2.1.4...v2.1.5) (2024-06-10)\n\n\n### Bug Fixes\n\n* update react to 18 and react-tabs to 6 ([#2547](https://github.com/Redocly/redoc/issues/2547)) ([c664dd0](https://github.com/Redocly/redoc/commit/c664dd0d56571ce799b8eadd081d86a6b2cdefae))\n\n\n\n## [2.1.4](https://github.com/Redocly/redoc/compare/v2.1.3...v2.1.4) (2024-04-25)\n\n\n### Bug Fixes\n\n* add deprecated css to clickable property name ([#2526](https://github.com/Redocly/redoc/issues/2526)) ([b0d03d0](https://github.com/Redocly/redoc/commit/b0d03d02069c1508447ddebc2f8a3fffa9b03ce5))\n* use h2/h3 for headings instead of h1/h2 for better seo ([#2514](https://github.com/Redocly/redoc/issues/2514)) ([2b72dc0](https://github.com/Redocly/redoc/commit/2b72dc0e90f759a8ee2e47691c844e7f05928a24))\n* security vulnerability ([#2445](https://github.com/Redocly/redoc/pull/2445)) ([1f11f5](https://github.com/Redocly/redoc/commit/1f11f597c4f10ddd601db247f5034052b6ca689f))\n\n\n\n## [2.1.3](https://github.com/Redocly/redoc/compare/v2.1.2...v2.1.3) (2023-10-24)\n\n\n### Bug Fixes\n\n* default value as object in request body ([#2437](https://github.com/Redocly/redoc/issues/2437)) ([b36a6e2](https://github.com/Redocly/redoc/commit/b36a6e27bb3e03d39ee74c3e71f18a504539d91b))\n* display string pattern in array items ([#2438](https://github.com/Redocly/redoc/issues/2438)) ([8ddeb6d](https://github.com/Redocly/redoc/commit/8ddeb6dfda686ec8a6948eb2d96efb99bf422429))\n* hideRequestPayloadSample ([#2436](https://github.com/Redocly/redoc/issues/2436)) ([bf96061](https://github.com/Redocly/redoc/commit/bf960612a47bfe10ff205b9d78f3040515a5467d))\n* more cases for react18 and cli integration ([#2416](https://github.com/Redocly/redoc/issues/2416)) ([26674e7](https://github.com/Redocly/redoc/commit/26674e70c66b686d0f0baa569b186292c41e5726))\n\n\n\n## [2.1.2](https://github.com/Redocly/redoc/compare/v2.1.1...v2.1.2) (2023-09-11)\n\n\n### Bug Fixes\n\n* react18 cli integration ([#2404](https://github.com/Redocly/redoc/issues/2404)) ([76edc15](https://github.com/Redocly/redoc/commit/76edc159399150778b384be87ee958a93e5c491c))\n* style RefreshToken URL as <code> in the authorization section ([1d61001](https://github.com/Redocly/redoc/commit/1d6100111a0f3b609dadbd706354ce6125947df2))\n\n\n\n## [2.1.1](https://github.com/Redocly/redoc/compare/v2.1.0...v2.1.1) (2023-08-17)\n\n\n### Bug Fixes\n\n* hotfix, crash after 2.1 release ([0ab3428](https://github.com/Redocly/redoc/commit/0ab3428664f857ea07381686a2b4beb4c22b17c3))\n\n\n\n# [2.1.0](https://github.com/Redocly/redoc/compare/v2.0.0...v2.1.0) (2023-08-10)\n\n\n### Bug Fixes\n\n* call onLoaded if specs are not found ([#2182](https://github.com/Redocly/redoc/issues/2182)) ([0753bbe](https://github.com/Redocly/redoc/commit/0753bbea4b1425bdb09225fca45effae8003dce8))\n* default value for array query parameter ([#2186](https://github.com/Redocly/redoc/issues/2186)) ([3d410b6](https://github.com/Redocly/redoc/commit/3d410b6002c656efa780254c9c45c6249f90bce1))\n* **demo:** Get CORS proxy to work in Chrome on Windows ([#2220](https://github.com/Redocly/redoc/issues/2220)) ([1597bae](https://github.com/Redocly/redoc/commit/1597bae4032b65a94211e80aad51867e5af1ceb3))\n* error with immutable object spec ([#2179](https://github.com/Redocly/redoc/issues/2179)) ([53c4f36](https://github.com/Redocly/redoc/commit/53c4f36fad3e4453a72c1d136e37929de47cd35e))\n* improve accessible label by using the property name ([#2224](https://github.com/Redocly/redoc/issues/2224)) ([12be1bc](https://github.com/Redocly/redoc/commit/12be1bc5ffa11f9092c2faacd69d787f4e899960))\n* move role to list item to meet ARIA spec ([#2228](https://github.com/Redocly/redoc/issues/2228)) ([b8f7da6](https://github.com/Redocly/redoc/commit/b8f7da6b003ca12c1e2f0f4d42f3dd6d6f86ccac))\n* remove GenericObject shim ([#2177](https://github.com/Redocly/redoc/issues/2177)) ([127ef26](https://github.com/Redocly/redoc/commit/127ef260b961e07c5f82a7494b51dd3f04294e87))\n* renames 'FieldContstraints' to 'FieldConstraints' ([#2352](https://github.com/Redocly/redoc/issues/2352)) ([7e05202](https://github.com/Redocly/redoc/commit/7e052028d965624feb72d5f4b74fdb3c2d5df21f))\n* schema oneOf title with const ([#2350](https://github.com/Redocly/redoc/issues/2350)) ([4386867](https://github.com/Redocly/redoc/commit/4386867d908eae2aed2b9fd86e9f5476aadce52b))\n* **types/open-api:** import type ([#2213](https://github.com/Redocly/redoc/issues/2213)) ([33be51a](https://github.com/Redocly/redoc/commit/33be51a7a4068f44fd914314002c058a204ba0c2))\n\n\n### Features\n\n* add deprecation label to redoc-cli ([#2172](https://github.com/Redocly/redoc/issues/2172)) ([2ae7e08](https://github.com/Redocly/redoc/commit/2ae7e08af49321cea9bf2078f309b48bacf76ad6))\n* add option to hide the example code when using the `SchemaDefinition` component ([#2157](https://github.com/Redocly/redoc/issues/2157)) ([168189b](https://github.com/Redocly/redoc/commit/168189b2fdcf3667422ce3940ace3eedd0bdf284))\n* add support of react 18 ([#2369](https://github.com/Redocly/redoc/issues/2369)) ([054f604](https://github.com/Redocly/redoc/commit/054f604195629197aa8bd0fc46e91383ca5a05af))\n* add x-tags ([#2355](https://github.com/Redocly/redoc/issues/2355)) ([0bb21c8](https://github.com/Redocly/redoc/commit/0bb21c812840999d2dd2d96da42124746440b035))\n* enable keyboard navigation ([#2361](https://github.com/Redocly/redoc/issues/2361)) ([d21af58](https://github.com/Redocly/redoc/commit/d21af5841455901f0572ab475b7dc661acb86a71))\n* indicate whether request body is required or optional ([#2175](https://github.com/Redocly/redoc/issues/2175)) ([d3ad792](https://github.com/Redocly/redoc/commit/d3ad7925cfbd90b59b502b5ef53228fcd34b8a1e))\n\n\n\n# [2.0.0](https://github.com/Redocly/redoc/compare/v2.0.0-rc.77...v2.0.0) (2022-09-12)\n\n\n\n# [2.0.0-rc.77](https://github.com/Redocly/redoc/compare/v2.0.0-rc.76...v2.0.0-rc.77) (2022-09-06)\n\n\n### Bug Fixes\n\n* add hard limit on deref depth to prevent crashes ([ddde105](https://github.com/Redocly/redoc/commit/ddde105acaf0a77b0bb5d13df5fd6180bc8169e9))\n* do not use discriminator when specific schema was referenced in oneOf or anyOf ([#2153](https://github.com/Redocly/redoc/issues/2153)) ([6ac1e1e](https://github.com/Redocly/redoc/commit/6ac1e1eb183e97e2cd67ad14d8a39fac8289ebcc))\n* hoistOneOf missing refs stack and improve allOf for same $ref ([bb325d0](https://github.com/Redocly/redoc/commit/bb325d0d285c4cf4ee7c6d70878d2dd0dc9c6ed7))\n* latest docker cli tag ([#2140](https://github.com/Redocly/redoc/issues/2140)) ([8dc03eb](https://github.com/Redocly/redoc/commit/8dc03eb7ed262d6b1d460425ce43990710470845))\n* markdown parent name ([#2062](https://github.com/Redocly/redoc/issues/2062)) ([da9ed0b](https://github.com/Redocly/redoc/commit/da9ed0b4d1a4070d326ecb472459f0ff916c6036))\n\n### Features\n\n* feet: search feature to support path ([#2145](https://github.com/Redocly/redoc/issues/2145)) ([c52ee83f](https://github.com/Redocly/redoc/commit/c52ee83f77ccfc79137c85deafe8d93e68465d45))\n\n\n# [2.0.0-rc.76](https://github.com/Redocly/redoc/compare/v2.0.0-rc.75...v2.0.0-rc.76) (2022-08-18)\n\n\n### Bug Fixes\n\n* \"API Docs By Redocly\" overlapping last element in sidebar ([#2132](https://github.com/Redocly/redoc/issues/2132)) ([c60c6f5](https://github.com/Redocly/redoc/commit/c60c6f58917563d57c0eef650b9dfcece2e15049))\n* encoding issue in CDN responses ([#2130](https://github.com/Redocly/redoc/issues/2130)) ([7816902](https://github.com/Redocly/redoc/commit/781690284a45b2b8af9eb525757632d0d19ef453))\n* Optional authentication not rendered properly ([#2117](https://github.com/Redocly/redoc/issues/2117)) ([#2134](https://github.com/Redocly/redoc/issues/2134)) ([efd5e09](https://github.com/Redocly/redoc/commit/efd5e09c907b36a3999f4c9c3165b6b2bdc1d536))\n\n\n### Features\n\n* add clear cache for publish action ([#2129](https://github.com/Redocly/redoc/issues/2129)) ([d8093e3](https://github.com/Redocly/redoc/commit/d8093e3e2086874242eac82ddd202f35d5b8d558))\n\n\n\n# [2.0.0-rc.75](https://github.com/Redocly/redoc/compare/v2.0.0-rc.74...v2.0.0-rc.75) (2022-08-10)\n\n\n### Bug Fixes\n\n* duplication of title ([#2119](https://github.com/Redocly/redoc/issues/2119)) ([40ebfd2](https://github.com/Redocly/redoc/commit/40ebfd2d63758b37665e2e4447732f671811e2a5))\n* handle error if security scopes is invalid ([#2113](https://github.com/Redocly/redoc/issues/2113)) ([428fd69](https://github.com/Redocly/redoc/commit/428fd6983dc257f524121d98aeb1c58b39cf81f7))\n* publishing docker image to github packages ([#2115](https://github.com/Redocly/redoc/issues/2115)) ([250f6d1](https://github.com/Redocly/redoc/commit/250f6d12b2d31d2166990bd9cb83ca1c63509686))\n* Redocly logo ([#2109](https://github.com/Redocly/redoc/issues/2109)) ([a35bb3f](https://github.com/Redocly/redoc/commit/a35bb3ff26bf10b0e54383222df283800d6ee2c8))\n* search and navigate error ([cfd810f](https://github.com/Redocly/redoc/commit/cfd810fdf9d37862e07458fa1c3c04046e22f315))\n* sibling for openapi 3.1 ([#2112](https://github.com/Redocly/redoc/issues/2112)) ([0b1a790](https://github.com/Redocly/redoc/commit/0b1a79009010f0640a3030093b7c0dcf8caa49e4))\n\n\n### Features\n\n* add notification about new version available ([#2100](https://github.com/Redocly/redoc/issues/2100)) ([d6ca8cc](https://github.com/Redocly/redoc/commit/d6ca8cc53b9667f09ce8fef88dfac1039c562b78))\n\n\n\n# [2.0.0-rc.74](https://github.com/Redocly/redoc/compare/v2.0.0-rc.73...v2.0.0-rc.74) (2022-07-28)\n\n\n### Bug Fixes\n\n* invalid url when href is empty ([#2105](https://github.com/Redocly/redoc/issues/2105)) ([e5f0235](https://github.com/Redocly/redoc/commit/e5f02359851a3797283ee513d734ab8e27266b92))\n\n\n\n# [2.0.0-rc.73](https://github.com/Redocly/redoc/compare/v2.0.0-rc.72...v2.0.0-rc.73) (2022-07-28)\n\n\n### Bug Fixes\n\n* add label API docs by Redocly ([#2099](https://github.com/Redocly/redoc/issues/2099)) ([dcdab83](https://github.com/Redocly/redoc/commit/dcdab838903a5d923c5e327d07d7743214769a61))\n* add the latest tag for the CLI docker image ([#2087](https://github.com/Redocly/redoc/issues/2087)) ([80ecd0f](https://github.com/Redocly/redoc/commit/80ecd0f19746379b056bfb1b11950693f3dc3724))\n* correct URLs of OperationModel servers for static site generation ([#2081](https://github.com/Redocly/redoc/issues/2081)) ([b1afd08](https://github.com/Redocly/redoc/commit/b1afd08bcf83770b537ed1eb9c90341de0162a1c))\n* enum duplication values when schema uses a specific combination of oneOf and allOf([#2088](https://github.com/Redocly/redoc/issues/2088)) ([e411847](https://github.com/Redocly/redoc/commit/e4118479f69209c5dd09a2be0e978834dcd9eb8f))\n* highlight text syntax ([#2069](https://github.com/Redocly/redoc/issues/2069)) ([4fc6aa0](https://github.com/Redocly/redoc/commit/4fc6aa0859c94e25fd30c4a4250455e44cc76488))\n* merge reference for openapi 3.1 ([#2063](https://github.com/Redocly/redoc/issues/2063)) ([87541e4](https://github.com/Redocly/redoc/commit/87541e45dc2526696deb32a6350a14a44a709b54))\n* nested patternProperties ([#2073](https://github.com/Redocly/redoc/issues/2073)) ([9920991](https://github.com/Redocly/redoc/commit/99209910806b85289a89fb3131049ed79118bc72))\n* operation url in static page ([#2093](https://github.com/Redocly/redoc/issues/2093)) ([98eec19](https://github.com/Redocly/redoc/commit/98eec19647b63f3598ec30fdeb428f614cf93ad4))\n* property with nested allOf ([#2083](https://github.com/Redocly/redoc/issues/2083)) ([7cc0500](https://github.com/Redocly/redoc/commit/7cc0500f3c1ddd1da17ee31278468207093f9281))\n* recursion for boolean items ([#2097](https://github.com/Redocly/redoc/issues/2097)) ([a5804db](https://github.com/Redocly/redoc/commit/a5804db1ce60ee6d90db8a3b54138eb1ca420c6f))\n* resolve dependency conflict in installing ([#2060](https://github.com/Redocly/redoc/issues/2060)) ([e26c8b2](https://github.com/Redocly/redoc/commit/e26c8b23d9b36abd5572bd0fe350d74a5cf65afb))\n* restore old variant security injections ([#2075](https://github.com/Redocly/redoc/issues/2075)) ([1a1bc26](https://github.com/Redocly/redoc/commit/1a1bc26503c06b6a7022289e5b9353bd59e48a9a))\n* rewrite recursive checks ([#2072](https://github.com/Redocly/redoc/issues/2072)) ([2970f95](https://github.com/Redocly/redoc/commit/2970f959cfa31cb4d5288ca23ca05cd34357dcec))\n* Scrolling keeps rewriting url after a Redoc element was removed [#2051](https://github.com/Redocly/redoc/issues/2051) ([#2085](https://github.com/Redocly/redoc/issues/2085)) ([0045be0](https://github.com/Redocly/redoc/commit/0045be0b753b8fb7d8d58a4e511783a6ba858444))\n* mis-nesting of aria roles on sidebar navigation ([#2050](https://github.com/Redocly/redoc/issues/2050)) ([7ca10da](https://github.com/Redocly/redoc/commit/7ca10daf12f2cac9fecf559b11f0f0c8bd21ae43))\n* 404 on the documentation page ([#2092](https://github.com/Redocly/redoc/issues/2050)) ([17bb08](https://github.com/Redocly/redoc/commit/17bb08909a1734e6e59c83ce29f31ae7cf6fc784))\n\n\n\n\n# [2.0.0-rc.72](https://github.com/Redocly/redoc/compare/v2.0.0-rc.71...v2.0.0-rc.72) (2022-06-02)\n\n\n### Bug Fixes\n\n* handled style change in ServerUrl and ServersOverlay dynamically ([#1989](https://github.com/Redocly/redoc/issues/1989)) ([a366de4](https://github.com/Redocly/redoc/commit/a366de4cf67fb94baa33b7b5c311cc1f54a63e53))\n* nested items with refs ([#2035](https://github.com/Redocly/redoc/issues/2035)) ([51127aa](https://github.com/Redocly/redoc/commit/51127aadc3e6b0f8e4066afb1c3b2ea6db453da2))\n\n\n\n# [2.0.0-rc.71](https://github.com/Redocly/redoc/compare/v2.0.0-rc.70...v2.0.0-rc.71) (2022-05-31)\n\n\n### Bug Fixes\n\n* constraints label details ([eb0917d](https://github.com/Redocly/redoc/commit/eb0917d002e57353027fee9c8f07605de8f1ff6f))\n* merge allOf in correct order ([#2020](https://github.com/Redocly/redoc/issues/2020)) ([1e4ea03](https://github.com/Redocly/redoc/commit/1e4ea03d4a9b7eddf3e4cc7cbdbd4d913583e837))\n\n\n### Features\n\n* add hideSecuritySection option allowing to disable the Security panel ([#2027](https://github.com/Redocly/redoc/issues/2027)) ([49cc11d](https://github.com/Redocly/redoc/commit/49cc11d91795653ca870e9276a1e0cd617964e25))\n* add Redoc to Redocly CDN ([#2026](https://github.com/Redocly/redoc/issues/2026)) ([77104d6](https://github.com/Redocly/redoc/commit/77104d6c0d6f457aa08a158e93b52a45877be84e))\n* add support prefix items ([27a9dba](https://github.com/Redocly/redoc/commit/27a9dbaf46aded01a6512645dab27870a85cc73b))\n* remove auth section ([#2022](https://github.com/Redocly/redoc/issues/2022)) ([a863302](https://github.com/Redocly/redoc/commit/a863302cc803bdf27187c613157ba90af1040fc4))\n* show minProperties maxProperties ([#2015](https://github.com/Redocly/redoc/issues/2015)) ([82712c5](https://github.com/Redocly/redoc/commit/82712c5b408dc6bc142307d45fb962de2a43ffba))\n\n\n\n# [2.0.0-rc.70](https://github.com/Redocly/redoc/compare/2.0.0-rc.69...2.0.0-rc.70) (2022-05-17)\n\n\n### Features\n\n* display patternProperties ([#2008](https://github.com/Redocly/redoc/issues/2008)) ([660cc85](https://github.com/Redocly/redoc/commit/660cc857bc86787e16237b407fe5f5d7a493bb48))\n* support conditional operators ([#1939](https://github.com/Redocly/redoc/issues/1939)) ([291b62a](https://github.com/Redocly/redoc/commit/291b62a206b68f8b4d98e4b74b71c0cad20a8b9b))\n* theme add links textDecoration options ([#1599](https://github.com/Redocly/redoc/issues/1599)) ([ba06485](https://github.com/Redocly/redoc/commit/ba06485ece27acbb6b846500817f4bff3e4997ba))\n\n\n\n# [2.0.0-rc.69](https://github.com/Redocly/redoc/compare/v2.0.0-rc.68.1...v2.0.0-rc.69) (2022-05-12)\n\n\n### Bug Fixes\n\n* wrong base url format causing error when constructing new URL ([#1996](https://github.com/Redocly/redoc/issues/1996)) ([d2cdaa1](https://github.com/Redocly/redoc/commit/d2cdaa1221b6a5e7b5da2418414bce1586069deb))\n\n\n### Features\n\n* add download file option ([#1699](https://github.com/Redocly/redoc/issues/1699)) ([b601c9a](https://github.com/Redocly/redoc/commit/b601c9ae9e3288286f28e06854bd93cb3507706e))\n* add option to display verb in webhooks ([#1994](https://github.com/Redocly/redoc/issues/1994)) ([311d2ce](https://github.com/Redocly/redoc/commit/311d2ce64dcf1e68c2563a276b34dda0e08b709c))\n* support .redocly.yaml for options for redoc-cli ([#1981](https://github.com/Redocly/redoc/issues/1981)) ([1f417d6](https://github.com/Redocly/redoc/commit/1f417d67c6b2e0b49e41c713958c100d8e1ad19d))\n\n\n\n# [2.0.0-rc.68](https://github.com/Redocly/redoc/compare/v2.0.0-rc.67...v2.0.0-rc.68) (2022-05-10)\n\n\n### Bug Fixes\n\n* examples in json schema object([5b9aa27](https://github.com/Redocly/redoc/commit/5b9aa27af03a1c4616f7e0195afeba47d1deeaa0))\n* handle error when definition load fails ([#1979](https://github.com/Redocly/redoc/issues/1979)) ([508ebd5](https://github.com/Redocly/redoc/commit/508ebd58a3d66f2337e9641852322458a1bd9e6b))\n* large text in examples value ([#1974](https://github.com/Redocly/redoc/issues/1974)) ([60bc603](https://github.com/Redocly/redoc/commit/60bc603e9bb85a0c9c7ac38f7014876d397f0191))\n* not show scopes if keys empty or not exist ([#1975](https://github.com/Redocly/redoc/issues/1975)) ([4e793f0](https://github.com/Redocly/redoc/commit/4e793f07a81fa8bcd4ad384d1f87b3e6c290edb7))\n* remove dropdown-aria and use native select ([#1954](https://github.com/Redocly/redoc/issues/1954)) ([186f5a9](https://github.com/Redocly/redoc/commit/186f5a98bd466b1820121aadb865291bef8c6755))\n* make Redoc lib compatible with Webpack 5 ([#1982](https://github.com/Redocly/redoc/issues/1982)) ([867861](https://github.com/Redocly/redoc/commit/8678615a0e19c9484b4cd495d70293b542d196a5))\n\n### Features\n\n* implement configurable minimum characer length to init search ([#1402](https://github.com/Redocly/redoc/issues/1402)) ([0fa08fa](https://github.com/Redocly/redoc/commit/0fa08faab1c176a4bfc5a553e8e8f8b07aca659f))\n* support OAS 3.1 unevaluatedProperties ([#1978](https://github.com/Redocly/redoc/issues/1978)) ([0755ac6](https://github.com/Redocly/redoc/commit/0755ac6f04514eb0c08f90afceeda7858206b435))\n* publish dockerhub ([#1971](https://github.com/Redocly/redoc/issues/1971)) ([7e01a0](https://github.com/Redocly/redoc/commit/7e01a0cfe2ad8d06075bfc66ef3860edbef033f8))\n\n\n# [2.0.0-rc.67](https://github.com/Redocly/redoc/compare/v2.0.0-rc.66...v2.0.0-rc.67) (2022-04-28)\n\n\n### Bug Fixes\n\n* Expand/Collapse all buttons disappears for flat structures ([#1424](https://github.com/Redocly/redoc/issues/1424)) ([2ca8e08](https://github.com/Redocly/redoc/commit/2ca8e081baea6996eb01b5df27b8cd88331d5c96))\n* improve markdown render with CRLF ([#1953](https://github.com/Redocly/redoc/issues/1953)) ([aba2d1a](https://github.com/Redocly/redoc/commit/aba2d1ad2d8dda9f52055c36ebde1323457dfd3e))\n* issue with navigation when operationId contains backslash or quotes ([#1513](https://github.com/Redocly/redoc/issues/1513)) ([8f7e56c](https://github.com/Redocly/redoc/commit/8f7e56c747d88be5c5eb5c4bbaee0ff69e9cb2ec))\n* prefix operation ids with parent id ([#1245](https://github.com/Redocly/redoc/issues/1245)) ([fd8917e](https://github.com/Redocly/redoc/commit/fd8917e5c109840c1bfa4c2c0902b6dcec200286))\n\n\n### Features\n\n* add optional BASE_PATH to Docker config ([#1378](https://github.com/Redocly/redoc/issues/1378)) ([90f71c0](https://github.com/Redocly/redoc/commit/90f71c0d77719871910cfba883a32ad131bef059))\n* theme add sidebar activeBackgroundColor and activeTextColor ([#1600](https://github.com/Redocly/redoc/issues/1600)) ([6716b08](https://github.com/Redocly/redoc/commit/6716b08e8871d95880e9f5a6c5491038002754e8))\n\n\n\n# [2.0.0-rc.66](https://github.com/Redocly/redoc/compare/v2.0.0-rc.65...v2.0.0-rc.66) (2022-03-30)\n\n\n### Bug Fixes\n\n* add handle local files for serve command ([#1810](https://github.com/Redocly/redoc/issues/1810)) ([117071e](https://github.com/Redocly/redoc/commit/117071ee83a32d9b3350d8afe2bdb6365a44e2ec))\n* move comma out of code block in SecurityRequirement.tsx ([#1924](https://github.com/Redocly/redoc/issues/1924)) ([ab3e8a8](https://github.com/Redocly/redoc/commit/ab3e8a8f80f453066c5495e73ac932a8fef0830a))\n* rename bandle command and add deprecate notice ([#1935](https://github.com/Redocly/redoc/issues/1935)) ([eb096b6](https://github.com/Redocly/redoc/commit/eb096b69be52568fc581027161c7d0c4b26c56c1))\n\n\n### Features\n\n* add support for displaying operationId in the sidebar ([#1927](https://github.com/Redocly/redoc/issues/1927)) ([09786f2](https://github.com/Redocly/redoc/commit/09786f2a5ade6303ea00512483b172347721ca70))\n* add nonce support ([#1566](https://github.com/Redocly/redoc/issues/1566)) ([c75ac9c](https://github.com/Redocly/redoc/commit/c75ac9cf70012e2d539b379aab2f0974d088db07))\n* h2 set color form theme.colors.text.primary ([#1491](https://github.com/Redocly/redoc/pull/1491)) ([25be93](https://github.com/Redocly/redoc/commit/25be934bb184d7b2b6b47d004b3c83ce4d16a2c6))\n\n\n\n# [2.0.0-rc.65](https://github.com/Redocly/redoc/compare/v2.0.0-rc.64...v2.0.0-rc.65) (2022-03-15)\n\n\n### Bug Fixes\n\n* auth link scroll for Firerox ([#1922](https://github.com/Redocly/redoc/issues/1922)) ([fe67e9c](https://github.com/Redocly/redoc/commit/fe67e9c332fee716582a00d60fdf34767bff22d4))\n* improve customization fab ([#1891](https://github.com/Redocly/redoc/issues/1891)) ([635f379](https://github.com/Redocly/redoc/commit/635f379eb086268c91eef715148eca8f080cfb86))\n* sanitize array of items ([#1920](https://github.com/Redocly/redoc/issues/1920)) ([059bd80](https://github.com/Redocly/redoc/commit/059bd8000e5fd65753d5ca9e0c47940394e0c79b))\n* use x-displayName in securityDefinitions ([#1444](https://github.com/Redocly/redoc/pull/1444)) ([ac6fb4](https://github.com/Redocly/redoc/commit/ac6fb458a4eee8d0da4b63f9bafc7669adc8af03))\n* deprecated badge on one of any of buttons ([#1930](https://github.com/Redocly/redoc/pull/1930)) ([f60b47](https://github.com/Redocly/redoc/commit/f60b4758330dd756d670309827da60d3465b672a))\n\n\n\n# [2.0.0-rc.64](https://github.com/Redocly/redoc/compare/v2.0.0-rc.63...v2.0.0-rc.64) (2022-02-24)\n\n\n### Bug Fixes\n\n* bump json-pointer version to avoid CVE-2021-23820 ([#1910](https://github.com/Redocly/redoc/issues/1910)) ([777efdd](https://github.com/Redocly/redoc/commit/777efdde35c1c8dc79dd714e1666279e9192dddb))\n* external ref in schema definition ([#1894](https://github.com/Redocly/redoc/issues/1894)) ([57cdd9f](https://github.com/Redocly/redoc/commit/57cdd9f6da38418d6214ac3c6480c5847ecd0228))\n\n\n\n# [2.0.0-rc.63](https://github.com/Redocly/redoc/compare/v2.0.0-rc.61...v2.0.0-rc.63) (2022-01-27)\n\n\n### Bug Fixes\n\n* scroll in sidebar ([b5b0d61](https://github.com/Redocly/redoc/commit/b5b0d61b3568ac2a8aaceafa96ffa6d2f86ed323))\n\n\n# [2.0.0-rc.62](https://github.com/Redocly/redoc/compare/v2.0.0-rc.61...v2.0.0-rc.62) (2022-01-26)\n\n\n### Bug Fixes\n\n* fix field expand does not work ([#1875](https://github.com/Redocly/redoc/issues/1875))\n\n\n# [2.0.0-rc.61](https://github.com/Redocly/redoc/compare/v2.0.0-rc.60...v2.0.0-rc.61) (2022-01-26)\n\n\n### Bug Fixes\n\n* fix crash in redoc-cli after migrating to esbuild ([#1872](https://github.com/Redocly/redoc/issues/1872))\n\n# [2.0.0-rc.60](https://github.com/Redocly/redoc/compare/v2.0.0-rc.59...v2.0.0-rc.60) (2022-01-25)\n\n\n### Bug Fixes\n\n* add schema expansion level ([#1868](https://github.com/Redocly/redoc/issues/1868)) ([250d53a](https://github.com/Redocly/redoc/commit/250d53a59fb4bf881875ba466c5a7f3b55d80007))\n* attachHeadingsDescriptions match headings incorrectly ([#1845](https://github.com/Redocly/redoc/issues/1845)) ([ea8573d](https://github.com/Redocly/redoc/commit/ea8573dbd78439be50aa2b38f1c83658c16783e3))\n* definition name util ([#1865](https://github.com/Redocly/redoc/issues/1865)) ([95a7347](https://github.com/Redocly/redoc/commit/95a734793158d4749e98ee4a7e90e70713a04ced))\n* No maxLength label is displayed for arrays of items [#1701](https://github.com/Redocly/redoc/issues/1701) ([#1765](https://github.com/Redocly/redoc/issues/1765)) ([6c7685e](https://github.com/Redocly/redoc/commit/6c7685e5fa04314328a445d7077600692c49489c))\n* Response objects couldn't open ([#1867](https://github.com/Redocly/redoc/issues/1867)) ([18f943d](https://github.com/Redocly/redoc/commit/18f943d2b5668f1552d212dee1c3a2ed59054095))\n* writeOnly params displaying in webhook ([#1866](https://github.com/Redocly/redoc/issues/1866)) ([5694913](https://github.com/Redocly/redoc/commit/5694913e71f0e8c3a5d9393f1b4ae92534127841))\n\n\n### Features\n\n* **#1251:** Add file selector to demo application ([#1859](https://github.com/Redocly/redoc/issues/1859)) ([b74dcde](https://github.com/Redocly/redoc/commit/b74dcde42b45ebe5ae617f1ec3cfea2ea1aff922)), closes [#1251](https://github.com/Redocly/redoc/issues/1251) [#1251](https://github.com/Redocly/redoc/issues/1251) [#1251](https://github.com/Redocly/redoc/issues/1251)\n* redoc-cli add host option ([#1598](https://github.com/Redocly/redoc/issues/1598)) ([fb104e6](https://github.com/Redocly/redoc/commit/fb104e696618b0b81439da134887830a0f2439ea))\n* support examples in object schema ([#1832](https://github.com/Redocly/redoc/issues/1832)) ([c986f0e](https://github.com/Redocly/redoc/commit/c986f0ef1a38bc1e61cae70830d84de03b684b89))\n\n\n\n# [2.0.0-rc.59](https://github.com/Redocly/redoc/compare/v2.0.0-rc.58...v2.0.0-rc.59) (2021-12-09)\n\n\n### Bug Fixes\n\n* fix scroll in example dropdown ([#1803](https://github.com/Redocly/redoc/issues/1803)) ([bc2d9a7](https://github.com/Redocly/redoc/commit/bc2d9a7d9cd530274483fecd136db290a5b46ff7))\n* x-examples for request body param does not display [#1743](https://github.com/Redocly/redoc/issues/1743) ([#1826](https://github.com/Redocly/redoc/issues/1826)) ([aaa3b32](https://github.com/Redocly/redoc/commit/aaa3b3280c8422d450e8849ae02135dde199d6d5))\n\n### Features\n\n* add option sideNavStyle ([#1805](https://github.com/Redocly/redoc/pull/1805)) ([2e4663b](https://github.com/Redocly/redoc/commit/2e4663b3b7022f25d3dc808afbcb3b3ad9483c41))\n\n\n# [2.0.0-rc.58](https://github.com/Redocly/redoc/compare/v2.0.0-rc.57...v2.0.0-rc.58) (2021-11-29)\n\n\n### Bug Fixes\n\n* add browser build for webpack 5 ([#1796](https://github.com/Redocly/redoc/issues/1796)) ([0e43ad3](https://github.com/Redocly/redoc/commit/0e43ad3102cfba8c4b30e59500ad4efc53f01c2d))\n* Default boolean property value not rendered [#1779](https://github.com/Redocly/redoc/issues/1779) ([#1781](https://github.com/Redocly/redoc/issues/1781)) ([734080c](https://github.com/Redocly/redoc/commit/734080c35471d16f87004f7f9a51dcdeee1278a6))\n* exclusiveMin/Max shows incorect range ([#1799](https://github.com/Redocly/redoc/issues/1799)) ([b604bd8](https://github.com/Redocly/redoc/commit/b604bd8da874f07e9e9f8b193ad10117a5f5059c))\n* mobile view in docker image ([#1795](https://github.com/Redocly/redoc/issues/1795)) ([ad652b9](https://github.com/Redocly/redoc/commit/ad652b9c7fbcd84a6e83397272de64e57213fe9a))\n\n\n\n# [2.0.0-rc.57](https://github.com/Redocly/redoc/compare/v2.0.0-rc.56...v2.0.0-rc.57) (2021-10-11)\n\n\n### Bug Fixes\n\n* fix deref logic for oas3.1 ([#1767](https://github.com/Redocly/redoc/issues/1767)) ([4fb9c83](https://github.com/Redocly/redoc/commit/4fb9c835256b9e44bcecabde7baf0f0f3e5beb3f))\n* improve publish action scripts ([#1729](https://github.com/Redocly/redoc/issues/1729)) ([952c05c](https://github.com/Redocly/redoc/commit/952c05c6b4b95fe6082611fed9e2f0913272b904))\n* No match scenario in search ([#1667](https://github.com/Redocly/redoc/issues/1667)) ([352a851](https://github.com/Redocly/redoc/commit/352a8518576dfb6b240ec41212a64f1c7312ab67))\n* OpenAPI 3.1: Missing description when $ref used [#1727](https://github.com/Redocly/redoc/issues/1727) ([fe6909e](https://github.com/Redocly/redoc/commit/fe6909ed80dd6053b48c30f63a2460614bf957a9))\n* OpenAPI 3.1: Missing description when $ref used [#1727](https://github.com/Redocly/redoc/issues/1727) ([35f7787](https://github.com/Redocly/redoc/commit/35f77878de7d1dd250040771f17757a5a6ce85f9))\n* Redoc spelling ([c87600d](https://github.com/Redocly/redoc/commit/c87600d520f037d291169b44b5803a35af16b5a5))\n* Schema for events incorrectly omits readOnly and includes writeOnly ([#1720](https://github.com/Redocly/redoc/issues/1720) [#1540](https://github.com/Redocly/redoc/issues/1540)) ([a8e0c29](https://github.com/Redocly/redoc/commit/a8e0c296852661dec1dcad2388d7589f9e0d3609))\n* scrolling to the first item ([#1753](https://github.com/Redocly/redoc/issues/1753)) ([bccd213](https://github.com/Redocly/redoc/commit/bccd21394ef79940c2efbe24a0d866c7af103d94))\n* The number of items in the array in the array is incorrect [#1762](https://github.com/Redocly/redoc/issues/1762) ([#1763](https://github.com/Redocly/redoc/issues/1763)) ([3b8d644](https://github.com/Redocly/redoc/commit/3b8d6441bd9978b849a53021d40fd4fe150272ea))\n\n\n### Features\n\n* add q/kdb+ syntax highlighting ([#1605](https://github.com/Redocly/redoc/issues/1605)) ([43451ba](https://github.com/Redocly/redoc/commit/43451ba4cd24270b8629a967d3fd2ce2eed8912e))\n* new option generatedPayloadSamplesMaxDepth ([#1642](https://github.com/Redocly/redoc/issues/1642)) ([bd9390a](https://github.com/Redocly/redoc/commit/bd9390a5bfc5458c06121110db33968a20fcebe4))\n\n\n\n# [2.0.0-rc.56](https://github.com/Redocly/redoc/compare/v2.0.0-rc.53...v2.0.0-rc.56) (2021-08-11)\n\n\n### Bug Fixes\n\n* handle empty object in security array ([#1678](https://github.com/Redocly/redoc/issues/1678)) ([9e1ea70](https://github.com/Redocly/redoc/commit/9e1ea703e56a71567b13d0d22e2d69945a22de4d))\n* hideLoading options in redoc standalone ([#1709](https://github.com/Redocly/redoc/issues/1709)) ([6a52a16](https://github.com/Redocly/redoc/commit/6a52a16d5b75a2955da7217c4a264f0fa8e98c89))\n* improve openapi 3.1 ([#1700](https://github.com/Redocly/redoc/issues/1700)) ([cd2d6f7](https://github.com/Redocly/redoc/commit/cd2d6f76e87c8385786a9c8e51c0d11c79d9707c))\n  - show contentEncoding on fields\n  - crash with OpenAPI 3.1 type as array of strings in requestBody\n  - nullable label not shown\n* nullable object's fields were missing ([#1721](https://github.com/Redocly/redoc/issues/1721)) ([ddf297b](https://github.com/Redocly/redoc/commit/ddf297b11269ef515bd62771912a5609721d5e39))\n\n\n### Features\n\n* add github action to build docker images and push to ghcr.io on release ([#1614](https://github.com/Redocly/redoc/issues/1614)) ([919a5f0](https://github.com/Redocly/redoc/commit/919a5f02fb94ca869011d5eaf63ee71b61b60150))\n* add yaml highlight ([#1684](https://github.com/Redocly/redoc/issues/1684)) ([d724440](https://github.com/Redocly/redoc/commit/d72444008533623c87f238fe8758b1dd518b89eb))\n* added localization for some labels ([#1675](https://github.com/Redocly/redoc/issues/1675)) ([ec50858](https://github.com/Redocly/redoc/commit/ec50858ec47af08c5fe553266fe3c209fba97eae))\n\n\n# [2.0.0-rc.55](https://github.com/Redocly/redoc/compare/v2.0.0-rc.54...v2.0.0-rc.55) (2021-07-01)\n\n\n### Bug Fixes\n\n* broken linkify ([3df72fb](https://github.com/Redocly/redoc/commit/3df72fb99ff24fb9a551565b7568d96f8614ed6f)), closes [#1655](https://github.com/Redocly/redoc/issues/1655)\n* fix accidentally removed onLoaded ([b41a8b4](https://github.com/Redocly/redoc/commit/b41a8b4ac714084dc25de7914fa1f99386e907e2)), closes [#1656](https://github.com/Redocly/redoc/issues/1656)\n\n\n### Features\n\n* added git folder sync config ([a69f0fb](https://github.com/Redocly/redoc/commit/a69f0fb00986a04c812ab273711e8f3501b98139))\n\n\n\n# [2.0.0-rc.54](https://github.com/Redocly/redoc/compare/v2.0.0-rc.53...v2.0.0-rc.54) (2021-06-09)\n\n\n### Bug Fixes\n\n* added missing semicolon to styling ([#1578](https://github.com/Redocly/redoc/issues/1578)) ([dfc4cf1](https://github.com/Redocly/redoc/commit/dfc4cf1caa131aa7bc6da6d489e3a8425d800326))\n* parse json theme string for standalone tag ([#1492](https://github.com/Redocly/redoc/issues/1492)) ([d7a0a4d](https://github.com/Redocly/redoc/commit/d7a0a4da17241dd9c089202dba76a8312248616e))\n* right absolute path for load and bundle definition ([#1579](https://github.com/Redocly/redoc/issues/1579)) ([ab2d57a](https://github.com/Redocly/redoc/commit/ab2d57a5a2ac5df007d76be0d664f3fb5f909566))\n* use operation path if operation summary/description is not provided ([#1596](https://github.com/Redocly/redoc/issues/1596)) ([4b072be](https://github.com/Redocly/redoc/commit/4b072be8d1c0dc4f1fa627168eebaed0a0213e08)), closes [#1270](https://github.com/Redocly/redoc/issues/1270)\n\n\n### Features\n\n* add basic support OpenAPI 3.1 ([#1622](https://github.com/Redocly/redoc/issues/1622)) ([823be24](https://github.com/Redocly/redoc/commit/823be24b313c3a2445df7e0801a0cc79c20bacd1))\n* merge refs oas 3.1 ([#1640](https://github.com/Redocly/redoc/issues/1640)) ([f4ea368](https://github.com/Redocly/redoc/commit/f4ea368f78a693fd70d48b5e0e5ffce3560432f4))\n\n\n\n# [2.0.0-rc.51](https://github.com/Redocly/redoc/compare/v2.0.0-rc.50...v2.0.0-rc.51) (2021-04-08)\n\n### Bug Fixes\n\n* use openapi-core to bundle definition instead of json-schema-ref-parser ([5033946](https://github.com/Redocly/redoc/commit/503394655da2aac544e278796098cba93d9194b9)),\ncloses: [#1506](https://github.com/Redocly/redoc/issues/1506), [#1478](https://github.com/Redocly/redoc/issues/1478)\n* add disable-google-font parameter to serve command in cli ([c7bbef5](https://github.com/Redocly/redoc/commit/c7bbef515524095e957729eac35a5b7a97619b55)), closes [#1501](https://github.com/Redocly/redoc/issues/1501)\n\n\n\n# [2.0.0-rc.50](https://github.com/Redocly/redoc/compare/v2.0.0-rc.49...v2.0.0-rc.50) (2021-02-15)\n\n\n### Bug Fixes\n\n* add includes polyfill ([3ba622f](https://github.com/Redocly/redoc/commit/3ba622f3ab9e28c954fe05f42e7b90862fc3d544)), closes [#1530](https://github.com/Redocly/redoc/issues/1530)\n* background-color in search results ([#1531](https://github.com/Redocly/redoc/issues/1531)) ([d288165](https://github.com/Redocly/redoc/commit/d288165a4ea04aedc23dba12020a73e86f20755b))\n* false-positive recursive tag case when using oneOf + allOf ([#1534](https://github.com/Redocly/redoc/issues/1534)) ([8270481](https://github.com/Redocly/redoc/commit/8270481e9f0f381b392f7921d21cb06e0e673b6d))\n\n\n\n# [2.0.0-rc.49](https://github.com/Redocly/redoc/compare/v2.0.0-rc.48...v2.0.0-rc.49) (2021-01-30)\n\n\n### Bug Fixes\n\n* crash on multiple examples on parameter object ([0dce880](https://github.com/Redocly/redoc/commit/0dce880dce1e489c7e8963e352d97603262f4b86)), closes [#1485](https://github.com/Redocly/redoc/issues/1485)\n* fix SourceCodeWithCopy component to be non-pure ([040ce72](https://github.com/Redocly/redoc/commit/040ce72a8ae0c1ca7504e10e44d0b2ac7ba04977))\n* pass boolean and number values as a string in highlight function ([#1512](https://github.com/Redocly/redoc/issues/1512)) ([c874a59](https://github.com/Redocly/redoc/commit/c874a5942c3bf9f6a2dc5909e31d57925d40aa86))\n\n\n\n# [2.0.0-rc.48](https://github.com/Redocly/redoc/compare/v2.0.0-rc.47...v2.0.0-rc.48) (2020-11-30)\n\n\n### Bug Fixes\n\n* add missed labels to elements ([#1445](https://github.com/Redocly/redoc/issues/1445)) ([8c559bc](https://github.com/Redocly/redoc/commit/8c559bcbcde39efee7f1570b88840468bfdfb17c))\n\n\n### Features\n\n* add new option hideSchemaPattern ([#1475](https://github.com/Redocly/redoc/issues/1475)) ([bb4594e](https://github.com/Redocly/redoc/commit/bb4594ee58d89819c975bdb575083c0667e3d940))\n* support multiple examples for parameters ([#1470](https://github.com/Redocly/redoc/issues/1470)) ([d12e410](https://github.com/Redocly/redoc/commit/d12e410d99a988948b359093159df79572bc78ab))\n\n\n\n# [2.0.0-rc.46](https://github.com/Redocly/redoc/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2020-11-05)\n\n\n### Bug Fixes\n\n* fix arrow color in responses ([#1452](https://github.com/Redocly/redoc/issues/1452)) ([6bedcf9](https://github.com/Redocly/redoc/commit/6bedcf94b26d820101ab510b28d2b76a38999eea))\n* remove duplicated slash if hideHostname option enabled ([#1448](https://github.com/Redocly/redoc/issues/1448)) ([4729fc3](https://github.com/Redocly/redoc/commit/4729fc3d8fc83f4af087cd7932adf500b45bab4e))\n* use shrinkwrap for cli package ([#1446](https://github.com/Redocly/redoc/issues/1446)) ([4567534](https://github.com/Redocly/redoc/commit/4567534cbb26f13a72a64d49faca64fc992d6dd8))\n\n\n### Features\n\n* add tabTextColor option for responses ([#1451](https://github.com/Redocly/redoc/issues/1451)) ([702fea0](https://github.com/Redocly/redoc/commit/702fea0f410499101efc554983c6db58acc84889))\n\n\n\n# [2.0.0-rc.45](https://github.com/Redocly/redoc/compare/v2.0.0-rc.43...v2.0.0-rc.45) (2020-10-27)\n\n\n### Bug Fixes\n\n* fix the name of OpenID Connect security scheme ([#1425](https://github.com/Redocly/redoc/issues/1425)) ([c11f679](https://github.com/Redocly/redoc/commit/c11f679f82586a96225488c8a96d0c908bfd2e09))\n* increase colors contrast to make them more accessible ([#1433](https://github.com/Redocly/redoc/issues/1433)) ([e2de5b0](https://github.com/Redocly/redoc/commit/e2de5b065eabd00d301ea61106ddafc65bd83afa))\n\n\n### Features\n\n* add field constraint indicator for uniqueItems ([#1423](https://github.com/Redocly/redoc/issues/1423)) ([c0ae9de](https://github.com/Redocly/redoc/commit/c0ae9de60758aa7561ce8a04b6e0060d0bc4a258)), closes [#1353](https://github.com/Redocly/redoc/issues/1353)\n* new extensions hook PropertyDetailsCell + wrap property name into span ([0703f73](https://github.com/Redocly/redoc/commit/0703f73f79a1cabafdc1a908ebb0c5ab142ca825))\n\n\n\n# [2.0.0-rc.44](https://github.com/Redocly/redoc/compare/v2.0.0-rc.43...v2.0.0-rc.44) (2020-10-16)\n\n\n### Features\n\n* new extensions hook PropertyDetailsCell + wrap property name into span ([0fae030](https://github.com/Redocly/redoc/commit/0fae03099645bd9d3795709175640583b08dfc3d))\n\n\n\n# [2.0.0-rc.43](https://github.com/Redocly/redoc/compare/v2.0.0-rc.42...v2.0.0-rc.43) (2020-10-13)\n\n\n### Bug Fixes\n\n* fix broken observable after mobx upgrade ([#1415](https://github.com/Redocly/redoc/issues/1415)) ([26c407b](https://github.com/Redocly/redoc/commit/26c407bd0f2bc1ec9881e0a3668e09e645fc0cc0))\n\n\n\n# [2.0.0-rc.42](https://github.com/Redocly/redoc/compare/v2.0.0-rc.41...v2.0.0-rc.42) (2020-10-13)\n\n\n### Bug Fixes\n\n* hide dropdown input on IE 11 ([#1403](https://github.com/Redocly/redoc/issues/1403)) ([6632d84](https://github.com/Redocly/redoc/commit/6632d844536532227cb92290f9fc2b6b2f913270))\n* make samples accessible by keyboard ([#1401](https://github.com/Redocly/redoc/issues/1401)) ([146b38c](https://github.com/Redocly/redoc/commit/146b38c9d0b926765d8e00dd37204c30bf3ac4e0))\n* make schema layout more responsive on small screen ([#1411](https://github.com/Redocly/redoc/issues/1411)) ([84ab95d](https://github.com/Redocly/redoc/commit/84ab95ddc7b5dc159098aecf82ad922ffd4a3093))\n\n\n\n# [2.0.0-rc.41](https://github.com/Redocly/redoc/compare/v2.0.0-rc.40...v2.0.0-rc.41) (2020-09-24)\n\n\n### Bug Fixes\n\n* display response code at the top after adding a line break ([#1374](https://github.com/Redocly/redoc/issues/1374)) ([c801b87](https://github.com/Redocly/redoc/commit/c801b87d2aea5e17d35093e2548e1f51f42b1ee3))\n* fix displaying response title ([#1376](https://github.com/Redocly/redoc/issues/1376)) ([f3e8ab4](https://github.com/Redocly/redoc/commit/f3e8ab4f8e5522c9ea1ddedb143e23c7d62f5807))\n* fix displaying top-level object without any properties ([a5468fb](https://github.com/Redocly/redoc/commit/a5468fb7bb99fcfe33724af939b1a589c1219052))\n* show long pattern and add toggle button ([#1375](https://github.com/Redocly/redoc/issues/1375)) ([a6b41aa](https://github.com/Redocly/redoc/commit/a6b41aa00b7592512fdaa7532d9f5d85238db29b))\n\n\n### Features\n\n* load external search index ([346b10f](https://github.com/Redocly/redoc/commit/346b10f1739d6b44066bdf1f6aac39d5ee3567d2))\n* support for ignoring specified named schemas ([9730c4e](https://github.com/Redocly/redoc/commit/9730c4ee1c274c5775966959b69c209c40034b11))\n\n\n\n# [2.0.0-rc.40](https://github.com/Redocly/redoc/compare/v2.0.0-rc.39...v2.0.0-rc.40) (2020-08-24)\n\n\n### Bug Fixes\n\n* invalid discriminator dropdown behavior with enum ([be07197](https://github.com/Redocly/redoc/commit/be07197e6d1e85a3fd3e61189a36b288751c077d))\n\n\n\n# [2.0.0-rc.39](https://github.com/Redocly/redoc/compare/v2.0.0-rc.38...v2.0.0-rc.39) (2020-08-22)\n\n\n### Bug Fixes\n\n* fix broken dropdowns with SSR by using forked react-dropdown-aria ([c322639](https://github.com/Redocly/redoc/commit/c322639f7c3e7efbbd623ae83afb88faa91d9e67))\n* make callbacks expandable by keyboard ([#1354](https://github.com/Redocly/redoc/issues/1354)) ([46eee7b](https://github.com/Redocly/redoc/commit/46eee7b70c8ee9da0d8857a823c4df39a5f18b53))\n\n\n\n# [2.0.0-rc.38](https://github.com/Redocly/redoc/compare/v2.0.0-rc.37...v2.0.0-rc.38) (2020-08-20)\n\n\n### Bug Fixes\n\n* do not crash for invalid parameter.in value ([addf895](https://github.com/Redocly/redoc/commit/addf8956e33654a1586a8ac6ed7325519cd99da8)), closes [#1340](https://github.com/Redocly/redoc/issues/1340)\n* scale sideMenu labels according to computed font size ([#1356](https://github.com/Redocly/redoc/issues/1356)) ([fed9a06](https://github.com/Redocly/redoc/commit/fed9a061d59592ec17cedbe4fd392e1f74c21527))\n\n\n\n# [2.0.0-rc.37](https://github.com/Redocly/redoc/compare/v2.0.0-rc.36...v2.0.0-rc.37) (2020-08-14)\n\n\n### Features\n\n* add webhooks support ([#1304](https://github.com/Redocly/redoc/issues/1304)) ([41f81b4](https://github.com/Redocly/redoc/commit/41f81b4d96648fec6bf0c39799c0aa2dded48749))\n\n\n\n# [2.0.0-rc.36](https://github.com/Redocly/redoc/compare/v2.0.0-rc.35...v2.0.0-rc.36) (2020-08-04)\n\n\n### Bug Fixes\n\n* highlight json keys using different color ([#1287](https://github.com/Redocly/redoc/issues/1287)) ([c9596d4](https://github.com/Redocly/redoc/commit/c9596d4b6cd9dced9fdee77525e0da90960c562a))\n* make elements accessible by keyboard navigation tools ([#1339](https://github.com/Redocly/redoc/issues/1339)) ([2ce7189](https://github.com/Redocly/redoc/commit/2ce71895bc14f9189b4e6cbdb6d838898717823f))\n\n\n### Features\n\n* new option simpleOneOfTypeLabel ([7af2efe](https://github.com/Redocly/redoc/commit/7af2efe731cdb16ebe5de6cb3e96f80cceb7d98d))\n\n\n\n# [2.0.0-rc.35](https://github.com/Redocly/redoc/compare/v2.0.0-rc.34...v2.0.0-rc.35) (2020-07-24)\n\n### Bug Fixes\n\n* update EnumValues component ([#1324](https://github.com/Redocly/redoc/issues/1324)) ([de27ac0](https://github.com/Redocly/redoc/commit/de27ac03081d55967f5a479fb1352a83b8ceb8b2))\n\n\n\n# [2.0.0-rc.34](https://github.com/Redocly/redoc/compare/v2.0.0-rc.33...v2.0.0-rc.34) (2020-07-24)\n\nSame as rc.33 by mistake\n\n\n\n# [2.0.0-rc.33](https://github.com/Redocly/redoc/compare/v2.0.0-rc.31...v2.0.0-rc.33) (2020-07-21)\n\n\n### Bug Fixes\n\n* default style and explode for params ([633d712](https://github.com/Redocly/redoc/commit/633d71293fa9af2bda3bf456a9258625ee2b94a1)), closes [#1016](https://github.com/Redocly/redoc/issues/1016)\n* fix contrast ratio for response titles ([47c6319](https://github.com/Redocly/redoc/commit/47c63192062d87b2b3205b915472930eaff6cc03))\n* fix expand variable for vars with hyphens or dots ([0904b3f](https://github.com/Redocly/redoc/commit/0904b3fec24edc56c4a4951501fe02ae22fd852b)), closes [#926](https://github.com/Redocly/redoc/issues/926)\n* make dropdowns accessible by keyboard ([e8a0d10](https://github.com/Redocly/redoc/commit/e8a0d105ca52204b0d6fd61f5e909d9dbbe6f147))\n* make endpoint dropdown accessible ([3d25005](https://github.com/Redocly/redoc/commit/3d25005f084f06ac01b8fa13eb1d69092e99fd27))\n* make properties focusable ([05fd754](https://github.com/Redocly/redoc/commit/05fd7543a29e0aeb364c1ba3f2d736656de7b3b7))\n* make response sections focusable ([442014c](https://github.com/Redocly/redoc/commit/442014c06d6a7d2260adf7bc5798dd29869f10c9))\n* make sample controls focusable ([006031c](https://github.com/Redocly/redoc/commit/006031c51787b617f2b0aed80a4b8486c5d2d3ca))\n* update focus styling ([30a27c1](https://github.com/Redocly/redoc/commit/30a27c116b366428570d0b5516b5b2b4bcd0c5fc))\n\n\n### Features\n\n* add maxDisplayedEnumValues config and buttons for show/hide enums ([#1322](https://github.com/Redocly/redoc/issues/1322)) ([a2b018d](https://github.com/Redocly/redoc/commit/a2b018d393ee25fb8e9233f8123c29d14ab054c7))\n* array size info based on min max Items properties ([#1308](https://github.com/Redocly/redoc/issues/1308)) ([644e96a](https://github.com/Redocly/redoc/commit/644e96ae457047ce09f55aa1f14a42c41dbc1dc8))\n* new option sortEnumValuesAlphabetically ([#1321](https://github.com/Redocly/redoc/issues/1321)) ([a96a11a](https://github.com/Redocly/redoc/commit/a96a11a4dc8a509c6c3fba67dc4e065b66624e18))\n\n\n\n# [2.0.0-rc.32](https://github.com/Redocly/redoc/compare/v2.0.0-rc.31...v2.0.0-rc.32) (2020-07-21)\n\nSame as rc.31 by mistake\n\n\n\n# [2.0.0-rc.31](https://github.com/Redocly/redoc/compare/v2.0.0-rc.30...v2.0.0-rc.31) (2020-06-25)\n\n\n### Bug Fixes\n\n* do not display long regexps ([#1295](https://github.com/Redocly/redoc/issues/1295)) ([2ede22c](https://github.com/Redocly/redoc/commit/2ede22c45cc970ea1ac296adbae1f6032744f823))\n* prevent body scrolling when user scrolls side menu ([#1300](https://github.com/Redocly/redoc/issues/1300)) ([865a56a](https://github.com/Redocly/redoc/commit/865a56a2a9a105ef7b3b9150767399ca7339195a))\n\n\n\n# [2.0.0-rc.30](https://github.com/Redocly/redoc/compare/v2.0.0-rc.29...v2.0.0-rc.30) (2020-05-25)\n\n\n### Bug Fixes\n\n* add security headers to Docker nginx config ([#1244](https://github.com/Redocly/redoc/issues/1244)) ([4512436](https://github.com/Redocly/redoc/commit/4512436f1d88bd99558fe5f8384b37aa62562480))\n* keep 3-column layout on 13-inch mbp ([8d1d4c8](https://github.com/Redocly/redoc/commit/8d1d4c82e1377aecf936985ac13fa9bf5257562a))\n* proper search-index dispose ([9dd129d](https://github.com/Redocly/redoc/commit/9dd129d90b87f24ad20f084c44d48be50d750c94))\n\n\n\n# [2.0.0-rc.29](https://github.com/Redocly/redoc/compare/v2.0.0-rc.28...v2.0.0-rc.29) (2020-05-10)\n\n\n### Bug Fixes\n\n* depreacate x-code-samples, rename to x-codeSamples for consistency ([becc2f5](https://github.com/Redocly/redoc/commit/becc2f58568388b6500e6476874f27f62ff58ba9))\n* do not crash on incompatible allOf, console.warn instead ([6e607b9](https://github.com/Redocly/redoc/commit/6e607b9a2928b062c7705087432c0f0d88e74f5d)), closes [#1156](https://github.com/Redocly/redoc/issues/1156)\n* download button opens in new tab instead of downloading ([b59faad](https://github.com/Redocly/redoc/commit/b59faada8210a4c8f61fa0e850b7d844574a46d1)), closes [#1247](https://github.com/Redocly/redoc/issues/1247)\n* fix broken md headings with ampersand ([8460659](https://github.com/Redocly/redoc/commit/846065916d58cf628f0bc93c74be429ecdea12e7)), closes [#1173](https://github.com/Redocly/redoc/issues/1173)\n\n\n### Features\n\n* **cli:** add the --title option to the serve subcommand ([#1160](https://github.com/Redocly/redoc/issues/1160)) ([10414fc](https://github.com/Redocly/redoc/commit/10414fc6d5c0f91b5e93b1ed2326e4e508611324))\n\n\n\n# [2.0.0-rc.28](https://github.com/Redocly/redoc/compare/v2.0.0-rc.27...v2.0.0-rc.28) (2020-04-27)\n\n\n### Bug Fixes\n\n* encode URLs in json samples linkify (xss) ([62c01da](https://github.com/Redocly/redoc/commit/62c01da420fca2137674ae562d4ecba54db97da9)), thanks to @masatokinugawa\n\n\n\n# [2.0.0-rc.27](https://github.com/Redocly/redoc/compare/v2.0.0-rc.26...v2.0.0-rc.27) (2020-04-20)\n\n\n### Features\n\n* add callbacks support ([#1224](https://github.com/Redocly/redoc/issues/1224)) ([57e93ec](https://github.com/Redocly/redoc/commit/57e93ec4355de2659fcb5449b14b7ed738c6c276))\n\n\n\n# [2.0.0-rc.26](https://github.com/Redocly/redoc/compare/v2.0.0-rc.25...v2.0.0-rc.26) (2020-03-29)\n\n\n### Bug Fixes\n\n* crash to wrong spelling in localeCompare ([3908a7c](https://github.com/Redocly/redoc/commit/3908a7c46448d277b82318659cdea65db52f9e70)), closes [#1218](https://github.com/Redocly/redoc/issues/1218)\n\n\n\n# [2.0.0-rc.25](https://github.com/Redocly/redoc/compare/v2.0.0-rc.24...v2.0.0-rc.25) (2020-03-27)\n\n\n### Bug Fixes\n\n* do not collapse top level on Collapse All in json samples ([#1209](https://github.com/Redocly/redoc/issues/1209)) ([830371b](https://github.com/Redocly/redoc/commit/830371b5d1edf4ba7a138b3b3d78148d020e0349))\n* fix passing boolean value to showExtensions options ([#1211](https://github.com/Redocly/redoc/issues/1211)) ([c6eaa02](https://github.com/Redocly/redoc/commit/c6eaa0281bb0f62b019c865e4aefb863ce84d628))\n* improve names for some theme settings ([a0bd27c](https://github.com/Redocly/redoc/commit/a0bd27c75427a39abc9c753b0654678eed2f3851))\n* sort discriminator entries by mapping order ([#1216](https://github.com/Redocly/redoc/issues/1216)) ([ac4f915](https://github.com/Redocly/redoc/commit/ac4f915494f289d1c97ffdfe3af59efd94734f8c))\n\n\n### Features\n\n* add x-explicitMappingOnly extension ([#1215](https://github.com/Redocly/redoc/issues/1215)) ([ea5b0aa](https://github.com/Redocly/redoc/commit/ea5b0aabf9133d11d3a8fcb79f9515d21e0d7ac0))\n\n\n\n# [2.0.0-rc.24](https://github.com/Redocly/redoc/compare/v2.0.0-rc.23...v2.0.0-rc.24) (2020-03-17)\n\n\n### Bug Fixes\n\n* Add debounce for 300 ms when searching ([#1089](https://github.com/Redocly/redoc/issues/1089)) ([373f018](https://github.com/Redocly/redoc/commit/373f018d0c183f83d07a4dbad4a4e2c9ab159f69))\n* do not load SearchWorker if disableSearch is `true` ([#1191](https://github.com/Redocly/redoc/issues/1191)) ([af415e8](https://github.com/Redocly/redoc/commit/af415e89e8c074a3f7c84f76f24020a7bd545483)), closes [#764](https://github.com/Redocly/redoc/issues/764)\n* fix major search performance due to wrong marker element ([8c053cc](https://github.com/Redocly/redoc/commit/8c053cc474e88befc3338307317c0702d212d4c3)), closes [#1109](https://github.com/Redocly/redoc/issues/1109)\n\n\n### Features\n\n* new option expandSingleSchemaField ([7608800](https://github.com/Redocly/redoc/commit/7608800d0acaa2fa0099dc840e17cd5aa90b54ca))\n\n\n\n# [2.0.0-rc.23](https://github.com/Redocly/redoc/compare/v2.0.0-rc.22...v2.0.0-rc.23) (2020-02-09)\n\n\n### Bug Fixes\n\n* fix broken sticky sidebar in Chrome 80 ([1a2a7dd](https://github.com/Redocly/redoc/commit/1a2a7dd8331cedd6ced4c18accf0b417549b3ff3)), closes [#1167](https://github.com/Redocly/redoc/issues/1167)\n\n\n\n# [2.0.0-rc.22](https://github.com/Redocly/redoc/compare/v2.0.0-rc.21...v2.0.0-rc.22) (2020-01-15)\n\n\n### Bug Fixes\n\n* do not process oneOf if inherited from parent with discriminator ([5248415](https://github.com/Redocly/redoc/commit/52484157912d908daea8255d0b7d684b33258d7a))\n\n\n### Features\n\n* add HTTP syntax highlighting ([#1157](https://github.com/Redocly/redoc/issues/1157)) ([27a4af7](https://github.com/Redocly/redoc/commit/27a4af707686d56280753473b4294ee4af096534))\n\n\n\n# [2.0.0-rc.21](https://github.com/Redocly/redoc/compare/v2.0.0-rc.20...v2.0.0-rc.21) (2020-01-10)\n\n\n### Bug Fixes\n\n* empty servers behavior per OAS spec ([ed1db0c](https://github.com/Redocly/redoc/commit/ed1db0c9027087ae0ae923e390e3e1d638a647ae)), closes [#1151](https://github.com/Redocly/redoc/issues/1151)\n* fix duplicated content in tags when using md headings ([a260c84](https://github.com/Redocly/redoc/commit/a260c8414c34a259a70a20ebcd20ecbb06c3d250)), closes [#1150](https://github.com/Redocly/redoc/issues/1150) [#1152](https://github.com/Redocly/redoc/issues/1152)\n* use mobile menu background color value from theme ([#1144](https://github.com/Redocly/redoc/issues/1144)) ([41a9b3c](https://github.com/Redocly/redoc/commit/41a9b3c18228d236d182d3c15c9abc35ae72a0d5))\n\n\n\n# [2.0.0-rc.20](https://github.com/Redocly/redoc/compare/v2.0.0-rc.19...v2.0.0-rc.20) (2019-12-13)\n\n\n### Bug Fixes\n\n* fix missing parameters ([942d782](https://github.com/Redocly/redoc/commit/942d782b5a8d08767a7538741b75587cf1e67f44)), closes [#1142](https://github.com/Redocly/redoc/issues/1142)\n\n\n\n# [2.0.0-rc.19](https://github.com/Redocly/redoc/compare/v2.0.0-rc.18...v2.0.0-rc.19) (2019-12-13)\n\n\n### Bug Fixes\n\n* change the title of \"Security Scheme Type\" to match \"HTTP Authorization Scheme\" ([#1126](https://github.com/Redocly/redoc/issues/1126)) ([289c8e6](https://github.com/Redocly/redoc/commit/289c8e6ae1ff00371f86d3f2646607c64bc30050))\n* do not URI-encode parameter values for better readability ([6aeb0bf](https://github.com/Redocly/redoc/commit/6aeb0bf68df3f03f2ca1317f8b5787545bd363f1)), closes [#1138](https://github.com/Redocly/redoc/issues/1138)\n* fix sortByRequired (stabilise sort) ([#1136](https://github.com/Redocly/redoc/issues/1136)) ([d92434d](https://github.com/Redocly/redoc/commit/d92434d11b08e8b0f6be5453ec69aa1d0e0df79f)), closes [#1104](https://github.com/Redocly/redoc/issues/1104) [#1121](https://github.com/Redocly/redoc/issues/1121) [#1061](https://github.com/Redocly/redoc/issues/1061)\n* h2 padding on mobile ([7ed1a7e](https://github.com/Redocly/redoc/commit/7ed1a7ef0e7978a0dfb40afcc72c3362466f9624)), closes [#1118](https://github.com/Redocly/redoc/issues/1118)\n* python comment stripped in headings ([4a25aae](https://github.com/Redocly/redoc/commit/4a25aaef69fad814836392ea7e41eb32c182a261)), closes [#1116](https://github.com/Redocly/redoc/issues/1116)\n* remove hardcoded fontFamily for oneOf labels ([094ce91](https://github.com/Redocly/redoc/commit/094ce914e3f9cfe567b39db4ea88208014d8b686)), closes [#1120](https://github.com/Redocly/redoc/issues/1120)\n* search-box use theme ([1bf490c](https://github.com/Redocly/redoc/commit/1bf490c05b343d262f8819bf1ddc433e070be1b9))\n* support discriminator mapping 1-n ([6e390f9](https://github.com/Redocly/redoc/commit/6e390f9c7909da0b5d1d6fc571ab4ad92e715d6e)), closes [#1111](https://github.com/Redocly/redoc/issues/1111)\n* wrap json examples in code tag ([#1064](https://github.com/Redocly/redoc/issues/1064)) ([dc5430e](https://github.com/Redocly/redoc/commit/dc5430e53def780a81612d269cc3aea3f8785eea))\n\n\n### Features\n\n* display `multipleOf` constrains ([#1065](https://github.com/Redocly/redoc/issues/1065)) ([3e90133](https://github.com/Redocly/redoc/commit/3e901336643b988ae45ae86c485005b8865e6e04))\n* enable menuToggle by default ([5d81abe](https://github.com/Redocly/redoc/commit/5d81abeb28c1e4f2826e41424c10163834c37e45))\n* new option hideSchemaTitles ([11cc4c4](https://github.com/Redocly/redoc/commit/11cc4c4c3e04a7e5bf3a9ebba20d10fa882a49e5))\n* new option payloadSampleIdx ([eaaa99d](https://github.com/Redocly/redoc/commit/eaaa99d68e2392273e8d9c0173db3b546e035d5f))\n* **cli:** Fallback on the spec's title before falling back on… ([#1073](https://github.com/Redocly/redoc/issues/1073)) ([e01eea4](https://github.com/Redocly/redoc/commit/e01eea445c93d74b66533c860d76bb3aff4d6df2))\n\n\n\n# [2.0.0-rc.18](https://github.com/Redocly/redoc/compare/v2.0.0-rc.17...v2.0.0-rc.18) (2019-10-16)\n\n\n### Bug Fixes\n\n* add oneOf buttons vertical space when wrapped to new line ([cd9fd61](https://github.com/Redocly/redoc/commit/cd9fd61))\n* improve mime-type dropdown font ([ce885f8](https://github.com/Redocly/redoc/commit/ce885f8))\n\n\n\n# [2.0.0-rc.17](https://github.com/Redocly/redoc/compare/v2.0.0-rc.16...v2.0.0-rc.17) (2019-10-16)\n\n\n### Bug Fixes\n\n* active menu item scroll into view ([0a01e9a](https://github.com/Redocly/redoc/commit/0a01e9a))\n* changed several components style font-family to monospace ([#1063](https://github.com/Redocly/redoc/issues/1063)) ([0c20e64](https://github.com/Redocly/redoc/commit/0c20e64)), closes [#909](https://github.com/Redocly/redoc/issues/909)\n* no quotes for default values in header fields. ([#1059](https://github.com/Redocly/redoc/issues/1059)) ([b5af71d](https://github.com/Redocly/redoc/commit/b5af71d))\n* types over-pluralization ([#1057](https://github.com/Redocly/redoc/issues/1057)) ([4494f80](https://github.com/Redocly/redoc/commit/4494f80)), closes [#1053](https://github.com/Redocly/redoc/issues/1053)\n\n\n### Features\n\n* added support for file paths as --options cli argument ([#1049](https://github.com/Redocly/redoc/issues/1049)) ([4adb927](https://github.com/Redocly/redoc/commit/4adb927))\n\n\n\n# [2.0.0-rc.16](https://github.com/Redocly/redoc/compare/v2.0.0-rc.15...v2.0.0-rc.16) (2019-09-30)\n\n\n### Bug Fixes\n\n* fix scrollYOffset when SSR ([d09c1c1](https://github.com/Redocly/redoc/commit/d09c1c1))\n\n\n\n# [2.0.0-rc.15](https://github.com/Redocly/redoc/compare/v2.0.0-rc.14...v2.0.0-rc.15) (2019-09-30)\n\n\n### Bug Fixes\n\n* auth section appears twice ([5aa7784](https://github.com/Redocly/redoc/commit/5aa7784)), closes [#818](https://github.com/Redocly/redoc/issues/818)\n* clicking on group title breaks first tag ([4649683](https://github.com/Redocly/redoc/commit/4649683)), closes [#1034](https://github.com/Redocly/redoc/issues/1034)\n* do not crash on empty scopes ([e787d9e](https://github.com/Redocly/redoc/commit/e787d9e)), closes [#1044](https://github.com/Redocly/redoc/issues/1044)\n* false-positive recursive detection with allOf at the same level ([faa74d6](https://github.com/Redocly/redoc/commit/faa74d6))\n* fix scrollYOffset when SSR ([21258a5](https://github.com/Redocly/redoc/commit/21258a5))\n* left menu item before group is not highlighted ([67e2a8f](https://github.com/Redocly/redoc/commit/67e2a8f)), closes [#1033](https://github.com/Redocly/redoc/issues/1033)\n* remove excessive whitespace between md sections on small screens ([e318fb3](https://github.com/Redocly/redoc/commit/e318fb3)), closes [#874](https://github.com/Redocly/redoc/issues/874)\n* use url-template dependency ([#1008](https://github.com/Redocly/redoc/issues/1008)) ([32a464a](https://github.com/Redocly/redoc/commit/32a464a)), closes [#1007](https://github.com/Redocly/redoc/issues/1007)\n\n\n### Features\n\n* **cli:** added support for JSON string value for --options CLI argument ([#1047](https://github.com/Redocly/redoc/issues/1047)) ([2a28130](https://github.com/Redocly/redoc/commit/2a28130)), closes [#797](https://github.com/Redocly/redoc/issues/797)\n* **cli:** add `disableGoogleFont` parameter to cli ([#1045](https://github.com/Redocly/redoc/issues/1045)) ([aceb343](https://github.com/Redocly/redoc/commit/aceb343))\n* new option expandDefaultServerVariables ([#1014](https://github.com/Redocly/redoc/issues/1014)) ([0360dce](https://github.com/Redocly/redoc/commit/0360dce))\n\n\n\n\n# [2.0.0-rc.14](https://github.com/Redocly/redoc/compare/v2.0.0-rc.13...v2.0.0-rc.14) (2019-08-07)\n\n\n### Bug Fixes\n\n* fix escaping JSON string values ([58cb20d](https://github.com/Redocly/redoc/commit/58cb20d)), closes [#999](https://github.com/Redocly/redoc/issues/999)\n* revert expanding default server variables ([7849f7f](https://github.com/Redocly/redoc/commit/7849f7f))\n\n\n\n# [2.0.0-rc.13](https://github.com/Redocly/redoc/compare/v2.0.0-rc.12...v2.0.0-rc.13) (2019-08-01)\n\n\n### Bug Fixes\n\n* enum list doesn't wrap ([bfbb0c1](https://github.com/Redocly/redoc/commit/bfbb0c1)), closes [#993](https://github.com/Redocly/redoc/issues/993)\n* incorrect serialization of some parameter samples ([aba45db](https://github.com/Redocly/redoc/commit/aba45db)), closes [#992](https://github.com/Redocly/redoc/issues/992)\n* support json serialization for parameter examples ([1367380](https://github.com/Redocly/redoc/commit/1367380)), closes [#934](https://github.com/Redocly/redoc/issues/934)\n* unify accordion icons for responses section ([2afc2e4](https://github.com/Redocly/redoc/commit/2afc2e4)), closes [#975](https://github.com/Redocly/redoc/issues/975)\n* update to core.js 3 ([9e3375d](https://github.com/Redocly/redoc/commit/9e3375d)), closes [#997](https://github.com/Redocly/redoc/issues/997)\n\n\n\n# [2.0.0-rc.12](https://github.com/Redocly/redoc/compare/v2.0.0-rc.11...v2.0.0-rc.12) (2019-07-30)\n\n\n### Bug Fixes\n\n* rename ObjectDescription to SchemaDefinition as discussed ([4496622](https://github.com/Redocly/redoc/commit/4496622))\n\n\n\n# [2.0.0-rc.11](https://github.com/Redocly/redoc/compare/v2.0.0-rc.10...v2.0.0-rc.11) (2019-07-30)\n\n\n### Bug Fixes\n\n* do not add extra slashes to pattern ([70d1ee9](https://github.com/Redocly/redoc/commit/70d1ee9)), closes [#983](https://github.com/Redocly/redoc/issues/983)\n* dropdown fixes related to object description ([0504ad4](https://github.com/Redocly/redoc/commit/0504ad4))\n* incorrect serialization of parameter sample with hyphen ([f7dd658](https://github.com/Redocly/redoc/commit/f7dd658))\n* redoc-cli: Add missing content type header on compressed responses of `/` path\n\n\n### Features\n\n* menu items from tags + md extension for Schema Definition ([#681](https://github.com/Redocly/redoc/pull/681))\n* new option `menuToggle` - fold active MenuItem if clicked ([#963](https://github.com/Redocly/redoc/issues/963))\n* Add option for skipping quotes in enums `enumSkipQuotes` ([#968](https://github.com/Redocly/redoc/issues/968)) ([afc7e36](https://github.com/Redocly/redoc/commit/afc7e36))\n* add `sampleCollapseLevel` option ([#937](https://github.com/Redocly/redoc/issues/937)) ([d3f1c16](https://github.com/Redocly/redoc/commit/d3f1c16))\n\n# [2.0.0-rc.10](https://github.com/Redocly/redoc/compare/v2.0.0-rc.9...v2.0.0-rc.10) (2019-07-08)\n\n\n### Bug Fixes\n\n* broken headings with single quote ([51d3b9b](https://github.com/Redocly/redoc/commit/51d3b9b)), closes [#955](https://github.com/Redocly/redoc/issues/955)\n* fix fields table overflow if deeply nested with long title ([12b7057](https://github.com/Redocly/redoc/commit/12b7057))\n* hide empty example when it is not defined ([4bd499f](https://github.com/Redocly/redoc/commit/4bd499f))\n* markdown in examples descriptions + minor ui tweaks ([f52d9e8](https://github.com/Redocly/redoc/commit/f52d9e8))\n* organize response examples in dropdown and display description ([995e557](https://github.com/Redocly/redoc/commit/995e557))\n\n\n\n# [2.0.0-rc.9](https://github.com/Redocly/redoc/compare/v2.0.0-rc.8-1...v2.0.0-rc.9) (2019-06-27)\n\n\n### Bug Fixes\n\n* fix regression double slashes added to full URL display ([f29a4fe](https://github.com/Redocly/redoc/commit/f29a4fe))\n* IE11, add missing Object.assign polyfill ([888f04e](https://github.com/Redocly/redoc/commit/888f04e))\n* serialize parameter example values according to the spec ([#917](https://github.com/Redocly/redoc/issues/917)) ([3939286](https://github.com/Redocly/redoc/commit/3939286))\n* styled-component style error in tabs ([#946](https://github.com/Redocly/redoc/issues/946)) ([c488bbf](https://github.com/Redocly/redoc/commit/c488bbf))\n\n\n### Features\n\n* add x-additionalPropertiesName ([#622](https://github.com/Redocly/redoc/issues/622)) ([#944](https://github.com/Redocly/redoc/issues/944)) ([0eb1e66](https://github.com/Redocly/redoc/commit/0eb1e66))\n\n\n\n# [2.0.0-rc.8-1](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.8...v2.0.0-rc.8-1) (2019-05-13)\n\n\n### Bug Fixes\n\n* crash with empty servers with redoc-cli ([3d52b39](https://github.com/Rebilly/ReDoc/commit/3d52b39))\n\n\n\n# [2.0.0-rc.8](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.7...v2.0.0-rc.8) (2019-05-13)\n\n\n### Bug Fixes\n\n* fix broken CLI again ([4e12b5d](https://github.com/Rebilly/ReDoc/commit/4e12b5d))\n* fix logo gutter bg ([81896d3](https://github.com/Rebilly/ReDoc/commit/81896d3))\n\n\n\n# [2.0.0-rc.7](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.6...v2.0.0-rc.7) (2019-05-13)\n\n\n### Bug Fixes\n\n* crash in node due to broken URL parsing ([8df2b97](https://github.com/Rebilly/ReDoc/commit/8df2b97))\n\n\n\n# [2.0.0-rc.6](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2019-05-13)\n\n\n### Bug Fixes\n\n* broken schema tables with long enums ([3a74b74](https://github.com/Rebilly/ReDoc/commit/3a74b74))\n* deep linking sometimes not working when sent over messengers ([2491d97](https://github.com/Rebilly/ReDoc/commit/2491d97))\n\n\n\n# [2.0.0-rc.5](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2019-05-13)\n\n\n### Bug Fixes\n\n* change fontFamily for EndpointInfo ([#866](https://github.com/Rebilly/ReDoc/issues/866)) ([851b133](https://github.com/Rebilly/ReDoc/commit/851b133))\n* clean up field values display ([#855](https://github.com/Rebilly/ReDoc/issues/855)) ([5c91590](https://github.com/Rebilly/ReDoc/commit/5c91590))\n* discriminator and oneOf title fix ([a3d7d7a](https://github.com/Rebilly/ReDoc/commit/a3d7d7a))\n* encode x-www-form-urlencoded examples correctly ([65930ad](https://github.com/Rebilly/ReDoc/commit/65930ad)), closes [#870](https://github.com/Rebilly/ReDoc/issues/870)\n* fix redoc-cli broken dependencies ([81a7568](https://github.com/Rebilly/ReDoc/commit/81a7568))\n* IE11 add missing fetch and URL polyfills ([d2ce1bd](https://github.com/Rebilly/ReDoc/commit/d2ce1bd)), closes [#875](https://github.com/Rebilly/ReDoc/issues/875)\n* ignore empty x-tagGroups array ([#869](https://github.com/Rebilly/ReDoc/issues/869)) ([4366a0d](https://github.com/Rebilly/ReDoc/commit/4366a0d))\n* incorrect detected schema title for deeply inherited schemas ([7d7b4e3](https://github.com/Rebilly/ReDoc/commit/7d7b4e3))\n* pluralize array of types ([fdcac30](https://github.com/Rebilly/ReDoc/commit/fdcac30))\n* remove huge space after Authentication section ([548fae3](https://github.com/Rebilly/ReDoc/commit/548fae3)), closes [#872](https://github.com/Rebilly/ReDoc/issues/872)\n* remove query string from server URL ([#895](https://github.com/Rebilly/ReDoc/issues/895)) ([64453ff](https://github.com/Rebilly/ReDoc/commit/64453ff))\n* remove tabs top margin ([5c187f3](https://github.com/Rebilly/ReDoc/commit/5c187f3))\n* right panel code samples bg color ([de2aed2](https://github.com/Rebilly/ReDoc/commit/de2aed2))\n* tidy up non-redoc vendor extension presentation ([#847](https://github.com/Rebilly/ReDoc/issues/847)) ([b21cd3d](https://github.com/Rebilly/ReDoc/commit/b21cd3d))\n* update apiKey in to be titleize ([#902](https://github.com/Rebilly/ReDoc/issues/902)) ([35df477](https://github.com/Rebilly/ReDoc/commit/35df477))\n* **cli:** add node-libs-browser to the deps ([6c79901](https://github.com/Rebilly/ReDoc/commit/6c79901)), closes [#850](https://github.com/Rebilly/ReDoc/issues/850)\n\n\n### Features\n\n* add hideSingleRequestSampleTab option ([4550e4d](https://github.com/Rebilly/ReDoc/commit/4550e4d))\n* add lineHeight config for headings ([#894](https://github.com/Rebilly/ReDoc/issues/894)) ([5dd5d6d](https://github.com/Rebilly/ReDoc/commit/5dd5d6d))\n* basic UI labels configuration ([b0e660e](https://github.com/Rebilly/ReDoc/commit/b0e660e)). Can be used for translations later.\n* add logo gutter to the theme ([82c0cb1a](https://github.com/Rebilly/ReDoc/commit/82c0cb1a)).\n\n# [2.0.0-rc.4](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2019-03-15)\n\n\n### Bug Fixes\n\n* move swagger2openapi to deps because of missing transitive deps ([ed9b878](https://github.com/Rebilly/ReDoc/commit/ed9b878))\n\n\n### Features\n\n* display requestBody description [#833](https://github.com/Rebilly/ReDoc/issues/833) ([#838](https://github.com/Rebilly/ReDoc/issues/838)) ([56ca371](https://github.com/Rebilly/ReDoc/commit/56ca371))\n\n\n# [2.0.0-rc.3](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.2...v2.0.0-rc.3) (2019-03-15)\n\n\n### Bug Fixes\n\n* add extra deref step for anyOf/oneOf variants ([d81b631](https://github.com/Rebilly/ReDoc/commit/d81b631)), closes [#810](https://github.com/Rebilly/ReDoc/issues/810)\n* duplicate keys in request samples ([3ce5bff](https://github.com/Rebilly/ReDoc/commit/3ce5bff)), closes [#815](https://github.com/Rebilly/ReDoc/issues/815)\n* escape backslashes in string literals ([#823](https://github.com/Rebilly/ReDoc/issues/823)) ([70faca1](https://github.com/Rebilly/ReDoc/commit/70faca1)), closes [#822](https://github.com/Rebilly/ReDoc/issues/822)\n* escape quotes in string values ([0473165](https://github.com/Rebilly/ReDoc/commit/0473165)), closes [#882](https://github.com/Rebilly/ReDoc/issues/882)\n* pin lunr version in ReDoc ([178ff4c](https://github.com/Rebilly/ReDoc/commit/178ff4c)), closes [#844](https://github.com/Rebilly/ReDoc/issues/844)\n* set last section min-height ([4dd79cd](https://github.com/Rebilly/ReDoc/commit/4dd79cd)), closes [#820](https://github.com/Rebilly/ReDoc/issues/820)\n\n\n### Features\n\n* support externalValue for examples ([2cdfcd2](https://github.com/Rebilly/ReDoc/commit/2cdfcd2)), closes [#551](https://github.com/Rebilly/ReDoc/issues/551) [#840](https://github.com/Rebilly/ReDoc/issues/840)\n* **cli:** Add templateOptions param to pass additional data to custom template ([#792](https://github.com/Rebilly/ReDoc/issues/792)) ([4e8ee03](https://github.com/Rebilly/ReDoc/commit/4e8ee03))\n\n\n\n# [2.0.0-rc.2](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.1...v2.0.0-rc.2) (2019-01-27)\n\n\n### Bug Fixes\n\n* make padding for md code blocks and code samples consistent ([007752d](https://github.com/Rebilly/ReDoc/commit/007752d))\n* make syntax highlighting for md js code blocks same as for payload samples ([d197c0f](https://github.com/Rebilly/ReDoc/commit/d197c0f))\n* Only display API version if present ([#773](https://github.com/Rebilly/ReDoc/issues/773)) ([fb3cb36](https://github.com/Rebilly/ReDoc/commit/fb3cb36))\n\n\n\n# [2.0.0-rc.1](https://github.com/Rebilly/ReDoc/compare/v2.0.0-rc.0...v2.0.0-rc.1) (2019-01-17)\n\n\n### Bug Fixes\n\n* allow docker container serving under non-root URLs ([#731](https://github.com/Rebilly/ReDoc/issues/731)) ([cfb6f0f](https://github.com/Rebilly/ReDoc/commit/cfb6f0f)), closes [#730](https://github.com/Rebilly/ReDoc/issues/730)\n* make example/defaults badge consistent with code blocks ([fa39ce4](https://github.com/Rebilly/ReDoc/commit/fa39ce4))\n* pattern constrain spacing ([c7436f2](https://github.com/Rebilly/ReDoc/commit/c7436f2))\n* sidebar navigation issues when scrollYOffset is float number ([c04f387](https://github.com/Rebilly/ReDoc/commit/c04f387)), closes [#748](https://github.com/Rebilly/ReDoc/issues/748)\n\n\n\n# [2.0.0-rc.0](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.41...v2.0.0-rc.0) (2018-11-27)\n\n\n### Bug Fixes\n\n* false-positive recursive detection with oneOf ([59eaa8d](https://github.com/Rebilly/ReDoc/commit/59eaa8d)), closes [#723](https://github.com/Rebilly/ReDoc/issues/723) [#585](https://github.com/Rebilly/ReDoc/issues/585)\n* fix hideHostname also hiding basePath ([b5f3224](https://github.com/Rebilly/ReDoc/commit/b5f3224)), closes [#677](https://github.com/Rebilly/ReDoc/issues/677)\n* fix spacing with nested markdown lists ([f2f6909](https://github.com/Rebilly/ReDoc/commit/f2f6909)), closes [#718](https://github.com/Rebilly/ReDoc/issues/718)\n* improve scrolling performance in Chrome with non-wrapped json examples ([a69c402](https://github.com/Rebilly/ReDoc/commit/a69c402))\n* nested oneOf button spacing ([3673720](https://github.com/Rebilly/ReDoc/commit/3673720)), closes [#719](https://github.com/Rebilly/ReDoc/issues/719)\n* onLoaded callback not run on spec error ([e77df0c](https://github.com/Rebilly/ReDoc/commit/e77df0c)), closes [#690](https://github.com/Rebilly/ReDoc/issues/690)\n* theme improvements by [@stasiukanya](https://github.com/stasiukanya) ([e2d0cd5](https://github.com/Rebilly/ReDoc/commit/e2d0cd5))\n* **cli:** old peer dependency issue with styled-components ([#699](https://github.com/Rebilly/ReDoc/issues/699)) ([9e2853c](https://github.com/Rebilly/ReDoc/commit/9e2853c))\n\n\n### Features\n\n* Add feature to specify href for logo explicitly ([#645](https://github.com/Rebilly/ReDoc/issues/645)) ([87fd7d7](https://github.com/Rebilly/ReDoc/commit/87fd7d7))\n* add support for markdown in Server Object ([155d214](https://github.com/Rebilly/ReDoc/commit/155d214))\n* Add support for minLength and maxLength constraint humanization ([#700](https://github.com/Rebilly/ReDoc/issues/700)) ([f40568b](https://github.com/Rebilly/ReDoc/commit/f40568b)), closes [#42](https://github.com/Rebilly/ReDoc/issues/42) [/github.com/Rebilly/ReDoc/issues/42#issuecomment-371883853](https://github.com//github.com/Rebilly/ReDoc/issues/42/issues/issuecomment-371883853)\n\n\n\n<a name=\"2.0.0-alpha.41\"></a>\n# [2.0.0-alpha.41](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.40...v2.0.0-alpha.41) (2018-10-18)\n\n\n### Bug Fixes\n\n* add null check in dispose method ([#675](https://github.com/Rebilly/ReDoc/issues/675)) ([6b7c5b7](https://github.com/Rebilly/ReDoc/commit/6b7c5b7))\n* extensionHook not being used ([a4a4013](https://github.com/Rebilly/ReDoc/commit/a4a4013)), closes [#665](https://github.com/Rebilly/ReDoc/issues/665)\n* fix issue with broken markdown caused by marked bug ([70cf293](https://github.com/Rebilly/ReDoc/commit/70cf293))\n\n### Peer dependencies updates\n\n* ReDoc now requires `styled-components@^4.0.1` to be installed if used as React component\n\n\n\n<a name=\"2.0.0-alpha.40\"></a>\n# [2.0.0-alpha.40](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.39...v2.0.0-alpha.40) (2018-10-05)\n\n\n### Bug Fixes\n\n* **cli:** add styled-components to dependencies ([2d63fa0](https://github.com/Rebilly/ReDoc/commit/2d63fa0))\n* allOf inside oneOf overwritten and not rendered ([fe3383d](https://github.com/Rebilly/ReDoc/commit/fe3383d)), closes [#660](https://github.com/Rebilly/ReDoc/issues/660)\n* fix panel paddings on small screens ([f39fc98](https://github.com/Rebilly/ReDoc/commit/f39fc98))\n* minor media print improvements ([fbcec82](https://github.com/Rebilly/ReDoc/commit/fbcec82))\n* remove extra-padding caused by empty group sections ([974bc7d](https://github.com/Rebilly/ReDoc/commit/974bc7d))\n* server overriding didn't work on Path Item object ([355764d](https://github.com/Rebilly/ReDoc/commit/355764d)), closes [#656](https://github.com/Rebilly/ReDoc/issues/656)\n\n\n### Features\n\n* new option `onlyRequiredInSamples` ([#646](https://github.com/Rebilly/ReDoc/issues/646)) ([10bca66](https://github.com/Rebilly/ReDoc/commit/10bca66))\n* new option `sortPropsAlphabetically` ([b87cf0d](https://github.com/Rebilly/ReDoc/commit/b87cf0d))\n* new theme options `spacing.sectionHorizontal` and `spacing.sectionVertical` ([505463f](https://github.com/Rebilly/ReDoc/commit/505463f))\n* turn off code-blocks wrapping (enable using `theme.typography.code.wrap: true`) ([393681b](https://github.com/Rebilly/ReDoc/commit/393681b)), closes [#658](https://github.com/Rebilly/ReDoc/issues/658)\n\n\n\n<a name=\"2.0.0-alpha.39\"></a>\n# [2.0.0-alpha.39](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.38...v2.0.0-alpha.39) (2018-09-14)\n\n\n### Bug Fixes\n\n* Increase badge size slightly so that \"PATCH\" method fits inside ([#632](https://github.com/Rebilly/ReDoc/issues/632)) ([4b3b5ba](https://github.com/Rebilly/ReDoc/commit/4b3b5ba))\n\n\n### Features\n\n* externalDocumentation rendered for tags, operations and schema fields ([#595](https://github.com/Rebilly/ReDoc/issues/595)) ([893c83e](https://github.com/Rebilly/ReDoc/commit/893c83e)), closes [#550](https://github.com/Rebilly/ReDoc/issues/550)\n\n\n\n<a name=\"2.0.0-alpha.38\"></a>\n# [2.0.0-alpha.38](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.37...v2.0.0-alpha.38) (2018-08-24)\n\n\n### Bug Fixes\n\n* add indent to array schema internals ([865f3ce](https://github.com/Rebilly/ReDoc/commit/865f3ce))\n* fix oneOf/anyOf titles ([39b930d](https://github.com/Rebilly/ReDoc/commit/39b930d)), closes [#618](https://github.com/Rebilly/ReDoc/issues/618) [#621](https://github.com/Rebilly/ReDoc/issues/621)\n\n\n\n<a name=\"2.0.0-alpha.37\"></a>\n# [2.0.0-alpha.37](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.36...v2.0.0-alpha.37) (2018-08-22)\n\n\n### Bug Fixes\n\n* do not inherit title in allOf ([720e282](https://github.com/Rebilly/ReDoc/commit/720e282)), closes [#601](https://github.com/Rebilly/ReDoc/issues/601)\n* fix crash on empty media object ([fb21212](https://github.com/Rebilly/ReDoc/commit/fb21212)), closes [#608](https://github.com/Rebilly/ReDoc/issues/608)\n* make http badges font-based instead of inline png ([5d84bd4](https://github.com/Rebilly/ReDoc/commit/5d84bd4))\n* use correct parent section for security definition ([f903406](https://github.com/Rebilly/ReDoc/commit/f903406))\n\n\n\n<a name=\"2.0.0-alpha.36\"></a>\n# [2.0.0-alpha.36](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.35...v2.0.0-alpha.36) (2018-08-11)\n\n\n### Bug Fixes\n\n* broken rendering of code blocks with language in markdown ([8218a26](https://github.com/Rebilly/ReDoc/commit/8218a26))\n* broken rendering of headings with regexp characters ([e660517](https://github.com/Rebilly/ReDoc/commit/e660517))\n\n\n\n<a name=\"2.0.0-alpha.35\"></a>\n# [2.0.0-alpha.35](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.34...v2.0.0-alpha.35) (2018-08-09)\n\n\n### Bug Fixes\n\n* crash on any backticks code block without lang specified ([58ae668](https://github.com/Rebilly/ReDoc/commit/58ae668))\n* fix auth requirements font size ([d13fe13](https://github.com/Rebilly/ReDoc/commit/d13fe13))\n\n\n<a name=\"2.0.0-alpha.34\"></a>\n# [2.0.0-alpha.34](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.33...v2.0.0-alpha.34) (2018-08-08)\n\n\n### Bug Fixes\n\n* add some spacing between operation description and parameters ([597688e](https://github.com/Rebilly/ReDoc/commit/597688e))\n* description is not rendered if doesn't contain markdown headings ([90ed717](https://github.com/Rebilly/ReDoc/commit/90ed717)), closes [#591](https://github.com/Rebilly/ReDoc/issues/591)\n* download button downloads index.html instead of spec with CLI ([334f904](https://github.com/Rebilly/ReDoc/commit/334f904)), closes [#594](https://github.com/Rebilly/ReDoc/issues/594)\n* fix Authentication section is not rendered ([2ecc8bc](https://github.com/Rebilly/ReDoc/commit/2ecc8bc)), closes [#590](https://github.com/Rebilly/ReDoc/issues/590)\n* fix linebreaks in multiparagraph field descriptions ([8fb9cd6](https://github.com/Rebilly/ReDoc/commit/8fb9cd6))\n* preserve md heading level in description ([23559fb](https://github.com/Rebilly/ReDoc/commit/23559fb))\n* render additionalProperties set to true ([#597](https://github.com/Rebilly/ReDoc/issues/597)) ([f70ac08](https://github.com/Rebilly/ReDoc/commit/f70ac08)), closes [#596](https://github.com/Rebilly/ReDoc/issues/596)\n* schemes without type: object are not expandable ([97e1620](https://github.com/Rebilly/ReDoc/commit/97e1620)), closes [#599](https://github.com/Rebilly/ReDoc/issues/599)\n\n\n### Features\n\n* Add x-logo alt text support ([#584](https://github.com/Rebilly/ReDoc/issues/584)) ([568ce74](https://github.com/Rebilly/ReDoc/commit/568ce74)), closes [#546](https://github.com/Rebilly/ReDoc/issues/546)\n* support label for x-code-samples ([00bd966](https://github.com/Rebilly/ReDoc/commit/00bd966)), closes [#586](https://github.com/Rebilly/ReDoc/issues/586)\n\n\n\n<a name=\"2.0.0-alpha.33\"></a>\n# [2.0.0-alpha.33](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.32...v2.0.0-alpha.33) (2018-07-31)\n\n\n### Bug Fixes\n\n* long endpoint url overflow ([d99e918](https://github.com/Rebilly/ReDoc/commit/d99e918))\n* allow word-break in code strings in md ([15dfe44](https://github.com/Rebilly/ReDoc/commit/15dfe44))\n* show examples for response headers ([ba22b1e](https://github.com/Rebilly/ReDoc/commit/ba22b1e))\n\n<a name=\"2.0.0-alpha.32\"></a>\n# [2.0.0-alpha.32](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.31...v2.0.0-alpha.32) (2018-07-26)\n\n\n### Bug Fixes\n\n* **cli:** add mobx to dependencies ([75ced44](https://github.com/Rebilly/ReDoc/commit/75ced44))\n* fix  resolving issue by upgrading to json-schema-ref-parser@5.1.1 ([0045958](https://github.com/Rebilly/ReDoc/commit/0045958)), closes [#541](https://github.com/Rebilly/ReDoc/issues/541)\n* remove break-all from code samples ([d74578d](https://github.com/Rebilly/ReDoc/commit/d74578d))\n* wrong display when combining multiple auth requirements ([f96c481](https://github.com/Rebilly/ReDoc/commit/f96c481)), closes [#577](https://github.com/Rebilly/ReDoc/issues/577)\n\n\n\n<a name=\"2.0.0-alpha.31\"></a>\n# [2.0.0-alpha.31](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.30...v2.0.0-alpha.31) (2018-07-23)\n\n\n### Bug Fixes\n\n* server url contains spec name if not specified in the spec ([b41b181](https://github.com/Rebilly/ReDoc/commit/b41b181))\n\n\n### Features\n\n* simple variable substitution support ([9d6b30c](https://github.com/Rebilly/ReDoc/commit/9d6b30c)), closes [#565](https://github.com/Rebilly/ReDoc/issues/565)\n\n\n\n<a name=\"2.0.0-alpha.30\"></a>\n# [2.0.0-alpha.30](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.29...v2.0.0-alpha.30) (2018-07-19)\n\n\n### Bug Fixes\n\n* fix usage with CRA by transpiling swagger2openapi deps ([6473e62](https://github.com/Rebilly/ReDoc/commit/6473e62)), closes [#566](https://github.com/Rebilly/ReDoc/issues/566)\n\n\n### Features\n\n* theme reshape and new options ([58bddc8](https://github.com/Rebilly/ReDoc/commit/58bddc8))\n\n\n\n<a name=\"2.0.0-alpha.29\"></a>\n# [2.0.0-alpha.29](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.28...v2.0.0-alpha.29) (2018-07-18)\n\n\n### Bug Fixes\n\n* **cli:** cli output crashes if script closing tag is in the spec ([76906eb](https://github.com/Rebilly/ReDoc/commit/76906eb)), closes [#563](https://github.com/Rebilly/ReDoc/issues/563)\n* different output of cli bundle and redoc ([89aa754](https://github.com/Rebilly/ReDoc/commit/89aa754)), closes [#547](https://github.com/Rebilly/ReDoc/issues/547)\n* fix broken link in CLI help ([bab3e7d](https://github.com/Rebilly/ReDoc/commit/bab3e7d)), closes [#559](https://github.com/Rebilly/ReDoc/issues/559)\n* fix Download button url when spec as object was provided ([c35925a](https://github.com/Rebilly/ReDoc/commit/c35925a)), closes [#462](https://github.com/Rebilly/ReDoc/issues/462) [#540](https://github.com/Rebilly/ReDoc/issues/540)\n* fix non-scalar query/path/header params are not expandable ([dcca44a](https://github.com/Rebilly/ReDoc/commit/dcca44a)), closes [#561](https://github.com/Rebilly/ReDoc/issues/561)\n* properly host oneOf inside allOf ([7e5b6d9](https://github.com/Rebilly/ReDoc/commit/7e5b6d9)), closes [#507](https://github.com/Rebilly/ReDoc/issues/507) [#528](https://github.com/Rebilly/ReDoc/issues/528)\n* regression - broken urls for operations without operationId ([c0c44bc](https://github.com/Rebilly/ReDoc/commit/c0c44bc))\n* use original tag name when slugified one is not valid ([#553](https://github.com/Rebilly/ReDoc/issues/553)) ([8817d9c](https://github.com/Rebilly/ReDoc/commit/8817d9c))\n\n\n### Features\n\n* new option disableSearch ([d4ab5ad](https://github.com/Rebilly/ReDoc/commit/d4ab5ad))\n\n\n\n<a name=\"2.0.0-alpha.28\"></a>\n# [2.0.0-alpha.28](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.27...v2.0.0-alpha.28) (2018-06-29)\n\n\n### Bug Fixes\n\n* inline markdown regression ([e1c9e19](https://github.com/Rebilly/ReDoc/commit/e1c9e19))\n\n\n\n<a name=\"2.0.0-alpha.27\"></a>\n# [2.0.0-alpha.27](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.25...v2.0.0-alpha.27) (2018-06-29)\n\n\n### Bug Fixes\n\n* change default font weight to 400 ([11947ed](https://github.com/Rebilly/ReDoc/commit/11947ed))\n* do not uppercase menu items by default ([0d45cc2](https://github.com/Rebilly/ReDoc/commit/0d45cc2))\n* fix link colors in json samples ([aaaa899](https://github.com/Rebilly/ReDoc/commit/aaaa899))\n\n\n### Features\n\n* display Value instead of Enum for one-item enum ([78fa312](https://github.com/Rebilly/ReDoc/commit/78fa312))\n* experimental temporary support for tags in md ([06ef51c](https://github.com/Rebilly/ReDoc/commit/06ef51c))\n* theme hooks experimental hooks ([55bd853](https://github.com/Rebilly/ReDoc/commit/55bd853))\n\n\n\n<a name=\"2.0.0-alpha.26\"></a>\n# [2.0.0-alpha.26](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.25...v2.0.0-alpha.26) (2018-06-28)\n\n\n### Bug Fixes\n\n* change default font weight to 400 ([11947ed](https://github.com/Rebilly/ReDoc/commit/11947ed))\n* do not uppercase menu items by default ([0d45cc2](https://github.com/Rebilly/ReDoc/commit/0d45cc2))\n* fix link colors in json samples ([aaaa899](https://github.com/Rebilly/ReDoc/commit/aaaa899))\n\n\n### Features\n\n* display Value instead of Enum for one-item enum ([78fa312](https://github.com/Rebilly/ReDoc/commit/78fa312))\n* experimental temporary support for tags in md ([06ef51c](https://github.com/Rebilly/ReDoc/commit/06ef51c))\n\n\n\n<a name=\"2.0.0-alpha.24\"></a>\n# [2.0.0-alpha.24](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.23...v2.0.0-alpha.24) (2018-06-01)\n\n\n### Bug Fixes\n\n* temporary downgrade marked as it introduced breaking changes and a few bugs ([902f97a](https://github.com/Rebilly/ReDoc/commit/902f97a))\n\n\n\n<a name=\"2.0.0-alpha.23\"></a>\n# [2.0.0-alpha.23](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.22...v2.0.0-alpha.23) (2018-05-31)\n\n\n### Bug Fixes\n\n* **cli:** make positional arguments required and handle errors in serve and bundle manually ([#518](https://github.com/Rebilly/ReDoc/issues/518)) ([370d08a](https://github.com/Rebilly/ReDoc/commit/370d08a))\n* fix typings on npm ([d957ad7](https://github.com/Rebilly/ReDoc/commit/d957ad7))\n* fix vertical line misaligned in firefox ([bde08f1](https://github.com/Rebilly/ReDoc/commit/bde08f1)), closes [#503](https://github.com/Rebilly/ReDoc/issues/503)\n* mergeAllOf takes items into account ([#511](https://github.com/Rebilly/ReDoc/issues/511)) ([47b2177](https://github.com/Rebilly/ReDoc/commit/47b2177))\n\n\n\n<a name=\"2.0.0-alpha.22\"></a>\n# [2.0.0-alpha.22](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.21...v2.0.0-alpha.22) (2018-05-29)\n\n\n### Bug Fixes\n\n* **cli:** create directories when a path is specified in the --output option ([#513](https://github.com/Rebilly/ReDoc/issues/513)) ([ac7372b](https://github.com/Rebilly/ReDoc/commit/ac7372b)), closes [#512](https://github.com/Rebilly/ReDoc/issues/512)\n* **cli:** return 1 as exit code if an error happens in the cli ([#516](https://github.com/Rebilly/ReDoc/issues/516)) ([720c304](https://github.com/Rebilly/ReDoc/commit/720c304))\n* fix font-weight inconsistency ([6ea2b7b](https://github.com/Rebilly/ReDoc/commit/6ea2b7b)), closes [#506](https://github.com/Rebilly/ReDoc/issues/506)\n* HEAD http verb support in menu badges ([2eb1952](https://github.com/Rebilly/ReDoc/commit/2eb1952)), closes [#493](https://github.com/Rebilly/ReDoc/issues/493)\n* more descriptive message for wrong discriminator use ([3c6de2c](https://github.com/Rebilly/ReDoc/commit/3c6de2c)), closes [#505](https://github.com/Rebilly/ReDoc/issues/505)\n\n\n### Features\n\n* add new experimental option unstable_ignoreMimeParameters ([d162bab](https://github.com/Rebilly/ReDoc/commit/d162bab))\n* support x-discriminator for OpenAPI 2 ([aaff311](https://github.com/Rebilly/ReDoc/commit/aaff311)), closes [#496](https://github.com/Rebilly/ReDoc/issues/496)\n\n\n\n<a name=\"2.0.0-alpha.21\"></a>\n# [2.0.0-alpha.21](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.20...v2.0.0-alpha.21) (2018-05-28)\n\n\n### Bug Fixes\n\n* add tslib dependency ([8e1a5cb](https://github.com/Rebilly/ReDoc/commit/8e1a5cb))\n* **cli:** escape \\u2029 \\u2028 characters ([5018473](https://github.com/Rebilly/ReDoc/commit/5018473)), closes [#475](https://github.com/Rebilly/ReDoc/issues/475)\n* reduce search index size ([a1fa4b4](https://github.com/Rebilly/ReDoc/commit/a1fa4b4))\n* replace \"oops\" with field name 🙈 ([6b1e8e7](https://github.com/Rebilly/ReDoc/commit/6b1e8e7))\n* specify caption-side ([64801b0](https://github.com/Rebilly/ReDoc/commit/64801b0)), closes [#509](https://github.com/Rebilly/ReDoc/issues/509)\n\n\n### Features\n\n* export TypeScript typings ([9115be8](https://github.com/Rebilly/ReDoc/commit/9115be8))\n* new theme colors: code and codeBg ([f8b793d](https://github.com/Rebilly/ReDoc/commit/f8b793d))\n* new theme option: nestingSpacing ([782ef77](https://github.com/Rebilly/ReDoc/commit/782ef77))\n\n\n\n<a name=\"2.0.0-alpha.20\"></a>\n# [2.0.0-alpha.20](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.19...v2.0.0-alpha.20) (2018-05-14)\n\n\n### Bug Fixes\n\n* fix worker is not defined in lib bundle ([6a5513e](https://github.com/Rebilly/ReDoc/commit/6a5513e))\n\n\n\n<a name=\"2.0.0-alpha.19\"></a>\n# [2.0.0-alpha.19](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.18...v2.0.0-alpha.19) (2018-05-14)\n\n\n### Bug Fixes\n\n* change look of additionalProperties ([126c6a6](https://github.com/Rebilly/ReDoc/commit/126c6a6))\n* disable chrome tap-highlight on mobile ([09cbe88](https://github.com/Rebilly/ReDoc/commit/09cbe88))\n* fix [@observer](https://github.com/observer) on PureComponent warning ([afb11d6](https://github.com/Rebilly/ReDoc/commit/afb11d6))\n* fix build caused by new babel decorators syntax, fixes [#487](https://github.com/Rebilly/ReDoc/issues/487) ([01f575c](https://github.com/Rebilly/ReDoc/commit/01f575c))\n* fix prism lang dependencies, fixes [#467](https://github.com/Rebilly/ReDoc/issues/467) ([42cf18e](https://github.com/Rebilly/ReDoc/commit/42cf18e))\n* fix spelling in error message ([#455](https://github.com/Rebilly/ReDoc/issues/455)) ([64119c4](https://github.com/Rebilly/ReDoc/commit/64119c4))\n* limit height of discriminator dropdown, fixes [#484](https://github.com/Rebilly/ReDoc/issues/484) ([6d1a9e5](https://github.com/Rebilly/ReDoc/commit/6d1a9e5))\n* path parameters are not correctly override, fixes [#481](https://github.com/Rebilly/ReDoc/issues/481) ([2cf4c3c](https://github.com/Rebilly/ReDoc/commit/2cf4c3c))\n\n\n### Features\n\n* display scope description as markdown, fixes [#466](https://github.com/Rebilly/ReDoc/issues/466) ([0d6deff](https://github.com/Rebilly/ReDoc/commit/0d6deff))\n\n\n\n<a name=\"2.0.0-alpha.18\"></a>\n# [2.0.0-alpha.18](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.17...v2.0.0-alpha.18) (2018-03-23)\n\n\n### Bug Fixes\n\n* fix logo width ([384c883](https://github.com/Rebilly/ReDoc/commit/384c883))\n* modify the peerDependencies to reflect the need for react 16.3 ([b29c329](https://github.com/Rebilly/ReDoc/commit/b29c329))\n* scroll to section sooner when SSR + simplify item ids ([d1d8042](https://github.com/Rebilly/ReDoc/commit/d1d8042))\n* **cli:** don't wait for content loaded in bundled HTML ([d9ee2d0](https://github.com/Rebilly/ReDoc/commit/d9ee2d0))\n\n<a name=\"2.0.0-alpha.17\"></a>\n# [2.0.0-alpha.17](https://github.com/Rebilly/ReDoc/compare/v2.0.0-alpha.16...v2.0.0-alpha.17) (2018-03-21)\n\n\n### Bug Fixes\n\n* css fix + update theme ([05403a7](https://github.com/Rebilly/ReDoc/commit/05403a7))\n* **cli:** allow to set url to the spec in SSR mode ([c9c6bc5](https://github.com/Rebilly/ReDoc/commit/c9c6bc5))\n* **cli:** fix crash ([8891f5c](https://github.com/Rebilly/ReDoc/commit/8891f5c))\n* **cli:** fix output option type ([c729c6c](https://github.com/Rebilly/ReDoc/commit/c729c6c))\n* **cli:** rename redoc-cli bin ([06b5a00](https://github.com/Rebilly/ReDoc/commit/06b5a00))\n* fix second-level heading in description ([a084532](https://github.com/Rebilly/ReDoc/commit/a084532))\n* make field type color more dark (closes [#439](https://github.com/Rebilly/ReDoc/issues/439)) ([d27e61a](https://github.com/Rebilly/ReDoc/commit/d27e61a))\n\n\n### Features\n\n* **cli:** add --template option ([b7afce9](https://github.com/Rebilly/ReDoc/commit/b7afce9))\n* **cli:** add options to specify redoc options ([2732c89](https://github.com/Rebilly/ReDoc/commit/2732c89))\n* **cli:** add title option to bundle ([bb8a678](https://github.com/Rebilly/ReDoc/commit/bb8a678))\n* add more options to theme ([cbce28a](https://github.com/Rebilly/ReDoc/commit/cbce28a))\n\n\n\n<a name=\"1.21.2\"></a>\n## [1.21.2](https://github.com/Rebilly/ReDoc/compare/v1.21.1...v1.21.2) (2018-02-26)\n\n\n### Bug Fixes\n\n* missing properties when using complex allOf (regression) ([6ce9245](https://github.com/Rebilly/ReDoc/commit/6ce9245)), closes [#422](https://github.com/Rebilly/ReDoc/issues/422)\n\n\n\n<a name=\"1.21.1\"></a>\n## [1.21.1](https://github.com/Rebilly/ReDoc/compare/v1.21.0...v1.21.1) (2018-02-23)\n\n\n### Bug Fixes\n\n* avoid endless recursion in schema-walker in some cases ([309cc23](https://github.com/Rebilly/ReDoc/commit/309cc23)), closes [#418](https://github.com/Rebilly/ReDoc/issues/418) [#395](https://github.com/Rebilly/ReDoc/issues/395)\n* fix crash when discriminator is used incorrectly ([b1d928d](https://github.com/Rebilly/ReDoc/commit/b1d928d))\n\n\n\n<a name=\"1.21.0\"></a>\n# [1.21.0](https://github.com/Rebilly/ReDoc/compare/v1.20.0...v1.21.0) (2018-02-18)\n\n\n### Bug Fixes\n\n* null example not used in schema samples ([420c51a](https://github.com/Rebilly/ReDoc/commit/420c51a)), closes [#415](https://github.com/Rebilly/ReDoc/issues/415)\n\n\n### Features\n\n* new option hide-download-button ([454e5bd](https://github.com/Rebilly/ReDoc/commit/454e5bd)), closes [#394](https://github.com/Rebilly/ReDoc/issues/394)\n\n\n\n<a name=\"1.20.0\"></a>\n## [1.20.0](https://github.com/Rebilly/ReDoc/compare/v1.19.3...v1.20.0) (2018-01-21)\n\n\n### Bug Fixes\n\n* Path parameters are not correctly overridden ([c406dc5](https://github.com/Rebilly/ReDoc/commit/c406dc5)), closes [#400](https://github.com/Rebilly/ReDoc/issues/400)\n* Use parentNode instead of parentElement to fix IE11 crash ([e8adb60](https://github.com/Rebilly/ReDoc/commit/e8adb60)), closes [#406](https://github.com/Rebilly/ReDoc/issues/406)\n\n\n### Features\n\n* align parameters to match up ([#375](https://github.com/Rebilly/ReDoc/issues/375)) ([d083c16](https://github.com/Rebilly/ReDoc/commit/d083c16))\n\n### Deprecations\n* Dropped bower support. No more dist files on the `releases` branch.\n\n\n\n<a name=\"2.0.0-alpha.15\"></a>\n# [2.0.0-alpha.15](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.14...v2.0.0-alpha.15) (2018-03-16)\n\n\n### Bug Fixes\n\n* fix broken css after installing polished ([6018042](https://github.com/Rebilly/Redoc/commit/6018042))\n\n\n### Features\n\n* more advanced theme engine ([1df690a](https://github.com/Rebilly/Redoc/commit/1df690a))\n\n\n\n<a name=\"2.0.0-alpha.14\"></a>\n# [2.0.0-alpha.14](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.13...v2.0.0-alpha.14) (2018-03-15)\n\n\n### Bug Fixes\n\n* fix CLI crash + build it on travis ([7769ba8](https://github.com/Rebilly/Redoc/commit/7769ba8))\n\n\n\n<a name=\"2.0.0-alpha.13\"></a>\n# [2.0.0-alpha.13](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.12...v2.0.0-alpha.13) (2018-03-15)\n\n\n### Bug Fixes\n\n* A couple minor bug fixes ([#436](https://github.com/Rebilly/Redoc/issues/436)) ([5dc21af](https://github.com/Rebilly/Redoc/commit/5dc21af))\n* add extra null-check + warning ([8757fa5](https://github.com/Rebilly/Redoc/commit/8757fa5))\n* add logo width to the theme ([28f2391](https://github.com/Rebilly/Redoc/commit/28f2391))\n* align logo by center ([18ec3ac](https://github.com/Rebilly/Redoc/commit/18ec3ac))\n* discriminator dropdown showing incorrect field if sorted ([bcf39dc](https://github.com/Rebilly/Redoc/commit/bcf39dc))\n* fix crash when referencing non-existing security scheme ([1f7fc44](https://github.com/Rebilly/Redoc/commit/1f7fc44))\n* fix overflowing content in JSON samples ([02c2413](https://github.com/Rebilly/Redoc/commit/02c2413))\n* fix right-panel blinking when scrolling + css improvements ([a78f9ab](https://github.com/Rebilly/Redoc/commit/a78f9ab))\n* fix search-indexing for SSR ([1428fb5](https://github.com/Rebilly/Redoc/commit/1428fb5))\n* fix the media queries utils so it gets the values from the current theme ([#420](https://github.com/Rebilly/Redoc/issues/420)) ([3924d3c](https://github.com/Rebilly/Redoc/commit/3924d3c))\n* fix worker import ([4896346](https://github.com/Rebilly/Redoc/commit/4896346))\n* make ReactStandalone react on props changes ([0cb0af2](https://github.com/Rebilly/Redoc/commit/0cb0af2))\n* merge inner properties of allOf ([8926dd4](https://github.com/Rebilly/Redoc/commit/8926dd4))\n* one-of dropdown not switching ([0f1b6a6](https://github.com/Rebilly/Redoc/commit/0f1b6a6))\n* referenced header name is empty ([13165fb](https://github.com/Rebilly/Redoc/commit/13165fb))\n* skipReadOnly/skipWritOnly not passing down to nested array ([6df8127](https://github.com/Rebilly/Redoc/commit/6df8127))\n* skipReadOnly/skipWritOnly not passing down to nested OneOf ([2462639](https://github.com/Rebilly/Redoc/commit/2462639))\n* various search fixes ([b797c96](https://github.com/Rebilly/Redoc/commit/b797c96))\n* writeOnly not respected in response samples ([87abdf7](https://github.com/Rebilly/Redoc/commit/87abdf7))\n\n\n### Features\n\n* add clear icon to searchbox ([825162e](https://github.com/Rebilly/Redoc/commit/825162e))\n* add hideDownloadButton option ([8dbe938](https://github.com/Rebilly/Redoc/commit/8dbe938))\n* add marker ([1ff2bd8](https://github.com/Rebilly/Redoc/commit/1ff2bd8))\n* arrow navigation in search results ([fe3245a](https://github.com/Rebilly/Redoc/commit/fe3245a))\n* basis search ([6990cd2](https://github.com/Rebilly/Redoc/commit/6990cd2))\n* ReDoc CLI ✨ ([390f6c1](https://github.com/Rebilly/Redoc/commit/390f6c1))\n* reqired-first sort order for params ([ecf33d2](https://github.com/Rebilly/Redoc/commit/ecf33d2))\n* serialize search-index ([e94f842](https://github.com/Rebilly/Redoc/commit/e94f842))\n\n\n\n<a name=\"2.0.0-alpha.12\"></a>\n# [2.0.0-alpha.12](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.11...v2.0.0-alpha.12) (2018-02-07)\n\n\n### Bug Fixes\n\n* basic responsiveness ([a29c3cc](https://github.com/Rebilly/Redoc/commit/a29c3cc))\n* crash in MarkdownRenderer on non-string ([dead161](https://github.com/Rebilly/Redoc/commit/dead161))\n* discriminator fix ([ff3bb24](https://github.com/Rebilly/Redoc/commit/ff3bb24))\n* filter out non-existing security schemas + warn ([ee822f6](https://github.com/Rebilly/Redoc/commit/ee822f6))\n* fix oneOf title for array ([1f3701d](https://github.com/Rebilly/Redoc/commit/1f3701d))\n* fix tbody > tr nesting warning ([a3cbb14](https://github.com/Rebilly/Redoc/commit/a3cbb14))\n* improve copy tooltip perf ([29207cf](https://github.com/Rebilly/Redoc/commit/29207cf))\n* resolve menu synchronization issue (use proper throttle) ([84d1c7b](https://github.com/Rebilly/Redoc/commit/84d1c7b))\n\n\n### Features\n\n* responsive side menu ([3aab2d9](https://github.com/Rebilly/Redoc/commit/3aab2d9))\n\n\n\n<a name=\"2.0.0-alpha.11\"></a>\n# [2.0.0-alpha.11](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.10...v2.0.0-alpha.11) (2018-01-29)\n\n\n### Bug Fixes\n\n* courier misspelling ([#409](https://github.com/Rebilly/Redoc/issues/409)) ([96fb7ce](https://github.com/Rebilly/Redoc/commit/96fb7ce))\n* crash on 2-level md heading at the beginning ([e9f23f7](https://github.com/Rebilly/Redoc/commit/e9f23f7))\n* make active tab more clear ([4b5df22](https://github.com/Rebilly/Redoc/commit/4b5df22))\n* perfect scroll not working ([199f240](https://github.com/Rebilly/Redoc/commit/199f240))\n* use array items example ([12f79f0](https://github.com/Rebilly/Redoc/commit/12f79f0)), closes [#408](https://github.com/Rebilly/Redoc/issues/408)\n* wrap text in code samples ([6c71a66](https://github.com/Rebilly/Redoc/commit/6c71a66))\n\n\n### Features\n\n* port \"copy to clipboard\" / \"expand/collapse all\" functionality ([5bb0bdf](https://github.com/Rebilly/Redoc/commit/5bb0bdf)), closes [#410](https://github.com/Rebilly/Redoc/issues/410)\n\n\n\n<a name=\"2.0.0-alpha.9\"></a>\n# [2.0.0-alpha.9](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.8...v2.0.0-alpha.9) (2018-01-11)\n\n\n### Bug Fixes\n\n* handle scrollYOffset in ScrollService ([dcab770](https://github.com/Rebilly/Redoc/commit/dcab770))\n\n\n\n<a name=\"2.0.0-alpha.8\"></a>\n# [2.0.0-alpha.8](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.7...v2.0.0-alpha.8) (2018-01-10)\n\n\n### Bug Fixes\n\n* undo section id + some minor fixes ([0253c5d](https://github.com/Rebilly/Redoc/commit/0253c5d))\n\n\n\n<a name=\"2.0.0-alpha.7\"></a>\n# [2.0.0-alpha.7](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.6...v2.0.0-alpha.7) (2018-01-10)\n\n\n### Bug Fixes\n\n* add id attr to headers to work before react is loaded if ssr ([1743453](https://github.com/Rebilly/Redoc/commit/1743453))\n* crate spec as data/base64 link when ssr ([33678e6](https://github.com/Rebilly/Redoc/commit/33678e6))\n* example value is not showed if it is false ([9756364](https://github.com/Rebilly/Redoc/commit/9756364))\n\n\n\n<a name=\"2.0.0-alpha.6\"></a>\n# [2.0.0-alpha.6](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2018-01-10)\n\n\n### Bug Fixes\n\n* allOf and deref exit not only named refs ([435cccd](https://github.com/Rebilly/Redoc/commit/435cccd))\n* do not ignore path level parameters ([14f8408](https://github.com/Rebilly/Redoc/commit/14f8408))\n* improve rendering of types ([17da7b7](https://github.com/Rebilly/Redoc/commit/17da7b7))\n* move title propagation to the correct place ([0b0bc99](https://github.com/Rebilly/Redoc/commit/0b0bc99))\n* overwrite text-align to left ([bfee3ed](https://github.com/Rebilly/Redoc/commit/bfee3ed))\n\n\n### Features\n\n* initial display security requirements ([50e2a58](https://github.com/Rebilly/Redoc/commit/50e2a58))\n\n\n\n<a name=\"2.0.0-alpha.5\"></a>\n# [2.0.0-alpha.5](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2017-12-07)\n\n\n### Bug Fixes\n\n* correct pointer for the schema ([4ae1574](https://github.com/Rebilly/Redoc/commit/4ae1574))\n* bundle in reftools in lib build (do not crash on prod builds in create-react-app) ([57129d3](https://github.com/Rebilly/Redoc/commit/57129d3))\n\n\n<a name=\"2.0.0-alpha.4\"></a>\n# [2.0.0-alpha.4](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2017-11-24)\n\n\n### Bug Fixes\n\n* add ellipsis for menu items with long words ([3421be2](https://github.com/Rebilly/Redoc/commit/3421be2))\n* crashes on some dereferencing/allOf merging cases ([335deb9](https://github.com/Rebilly/Redoc/commit/335deb9))\n* do not auto-append security-definitions if they are not in the spec ([426e5b6](https://github.com/Rebilly/Redoc/commit/426e5b6))\n* don't display operations without tags as tag items in menu ([ca81b6d](https://github.com/Rebilly/Redoc/commit/ca81b6d))\n\n\n\n<a name=\"2.0.0-alpha.3\"></a>\n# [2.0.0-alpha.3](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.2...v2.0.0-alpha.3) (2017-11-23)\n\n\n### Bug Fixes\n\n* crash when $ref is url encoded ([bdf6079](https://github.com/Rebilly/Redoc/commit/bdf6079))\n* make oneOf not skip fields defined alongside ([8680775](https://github.com/Rebilly/Redoc/commit/8680775))\n\n\n\n<a name=\"2.0.0-alpha.2\"></a>\n# 2.0.0-alpha.2 (2017-11-23)\n\n### Bug Fixes\n* Fix crash when using type `file` in OpenAPI 2.0 in some places\n\n<a name=\"2.0.0-alpha.1\"></a>\n# 2.0.0-alpha.1 (2017-11-23)\n\nComplete rewrite of ReDoc using React so here only major changes are listed.\nComplete rewrite also means that this rewrite may introduce issues, but they should be resolved before `2.0.0`.\n\n### Features\n\n- Basic Support for OpenAPI 3\n- Usage as a React component\n\n### Deprecations\n\n- Fonts are not loaded by ReDoc so you should load them. Default fonts can be loaded as below:\n\n```html\n<link href=\"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700\" rel=\"stylesheet\">\n```\n- no more bower releases\n- no more GitHub pages-based CDN. Use [unpkg.com](https://unpkg.com/) to access ReDoc releases\n\n\n### Known Regression (resolved before leaving alpha stage)\n- `lazyLoading` option not implemented yet\n- Copying to clipboard of samples not implemented yet\n- Search not implemented yet\n\n<a name=\"1.19.3\"></a>\n## [1.19.3](https://github.com/Rebilly/ReDoc/compare/v1.19.2...v1.19.3) (2017-11-16)\n\n\n### Bug Fixes\n\n* html characters not escaped in code blocks (fixes [#378](https://github.com/Rebilly/ReDoc/issues/378)) ([fef9ec4](https://github.com/Rebilly/ReDoc/commit/fef9ec4))\n\n\n<a name=\"1.19.2\"></a>\n## [1.19.2](https://github.com/Rebilly/ReDoc/compare/v1.19.1...v1.19.2) (2017-11-10)\n\n\n### Bug Fixes\n\n* response samples doesn't show only text/plain (fixes [#371](https://github.com/Rebilly/ReDoc/issues/371)) ([00aea06](https://github.com/Rebilly/ReDoc/commit/00aea06))\n\n\n<a name=\"1.19.1\"></a>\n# [1.19.1](https://github.com/Rebilly/ReDoc/compare/v1.19.0...v1.19.1) (2017-10-02)\n<a name=\"2.0.0-alpha.16\"></a>\n# [2.0.0-alpha.16](https://github.com/Rebilly/Redoc/compare/v2.0.0-alpha.15...v2.0.0-alpha.16) (2018-03-18)\n\n\n### Bug Fixes\n\n* move cli to a separate npm package ([95c7585](https://github.com/Rebilly/Redoc/commit/95c7585))\n* prefer `.extend` over `styled()` to make styles more predictable ([ed20ac1](https://github.com/Rebilly/Redoc/commit/ed20ac1))\n\n\n### Features\n\n* use new Context API for options ([e022349](https://github.com/Rebilly/Redoc/commit/e022349))\n\n\n<a name=\"1.19.0\"></a>\n# [1.19.0](https://github.com/Rebilly/ReDoc/compare/v1.18.1...v1.19.0) (2017-09-21)\n\n\n### Bug Fixes\n\n* Clearly label version compatibility ([8d849a6](https://github.com/Rebilly/ReDoc/commit/8d849a6)), closes [#338](https://github.com/Rebilly/ReDoc/issues/338)\n* HEAD http verb support ([d8b6e02](https://github.com/Rebilly/ReDoc/commit/d8b6e02)), closes [#342](https://github.com/Rebilly/ReDoc/issues/342)\n\n\n### Features\n\n* add ignoredHeaderParameters option ([56d62e5](https://github.com/Rebilly/ReDoc/commit/56d62e5))\n* add native-scrollbars option to workaround scrolling perf issues ([f2ed92c](https://github.com/Rebilly/ReDoc/commit/f2ed92c))\n\n\n<a name=\"1.18.1\"></a>\n## [1.18.1](https://github.com/Rebilly/ReDoc/compare/v1.17.0...v1.18.1) (2017-08-28)\n\n\n### Bug Fixes\n\n* crash if `contact` is not in the spec ([1b9ba0d](https://github.com/Rebilly/ReDoc/commit/1b9ba0d)), closes [#332](https://github.com/Rebilly/ReDoc/issues/332)\n\n\n<a name=\"1.18.0\"></a>\n# [1.18.0](https://github.com/Rebilly/ReDoc/compare/v1.16.1...v1.18.0) (2017-08-28)\n\n\n### Bug Fixes\n\n* increase padding top for `.api-info-wrapper` when left sidebar is hiding to avoid header overlaying by top menu ([514fc29](https://github.com/Rebilly/ReDoc/commit/514fc29))\n* add `display: inline-block` for `.openapi-button` ([86b4db4](https://github.com/Rebilly/ReDoc/commit/86b4db4)),\ncloses [#321](https://github.com/Rebilly/ReDoc/issues/321)\n* add margins around list-items in markdown ([b165785](https://github.com/Rebilly/ReDoc/commit/b165785))\n\n### Features\n\n* generate download link for specs defined by an object ([60e8cb4](https://github.com/Rebilly/ReDoc/commit/60e8cb4)), closes [#289](https://github.com/Rebilly/ReDoc/issues/289)\n* support text-plain response sample ([b84177c](https://github.com/Rebilly/ReDoc/commit/b84177c)), closes [#270](https://github.com/Rebilly/ReDoc/issues/270)\n* clickable logo that points to specific url ([cb3d318](https://github.com/Rebilly/ReDoc/commit/cb3d318)), closes\n[#322](https://github.com/Rebilly/ReDoc/issues/322)\n* support x-example for parameters ([f792273](https://github.com/Rebilly/ReDoc/commit/f792273)), closes\n[#297](https://github.com/Rebilly/ReDoc/issues/297)\n\n<a name=\"1.17.0\"></a>\n# [1.17.0](https://github.com/Rebilly/ReDoc/compare/v1.16.1...v1.17.0) (2017-08-02)\n\n\n### Bug Fixes\n\n* copy code-samples included \\n\\r characters ([cd962fa](https://github.com/Rebilly/ReDoc/commit/cd962fa)), closes [#296](https://github.com/Rebilly/ReDoc/issues/296)\n* enum with single value not shown in non-body params ([87d9abd](https://github.com/Rebilly/ReDoc/commit/87d9abd)), closes [#284](https://github.com/Rebilly/ReDoc/issues/284)\n* handle case where items is array in indexer ([5e5db72](https://github.com/Rebilly/ReDoc/commit/5e5db72)), closes [#304](https://github.com/Rebilly/ReDoc/issues/304)\n* output dates as ISO 8601 strings in JSON Formatter ([#313](https://github.com/Rebilly/ReDoc/issues/313)) ([86d8179](https://github.com/Rebilly/ReDoc/commit/86d8179))\n* make padding between h2 sections smaller ([2c89536](https://github.com/Rebilly/ReDoc/commit/2c89536)), closes [#291](https://github.com/Rebilly/ReDoc/issues/291)\n* ready-only for nested objects samples ([be41d6d](https://github.com/Rebilly/ReDoc/commit/be41d6d)), closes [#300](https://github.com/Rebilly/ReDoc/issues/300)\n\n\n### Features\n\n* add `hide-loading` option ([2ebca4b](https://github.com/Rebilly/ReDoc/commit/2ebca4b)), closes [#315](https://github.com/Rebilly/ReDoc/issues/315)\n* add special rendering for deprecated operations ([#290](https://github.com/Rebilly/ReDoc/issues/290)) ([2748aac](https://github.com/Rebilly/ReDoc/commit/2748aac))\n* export angular module *<not stable yet>* ([ef5101b](https://github.com/Rebilly/ReDoc/commit/ef5101b))\n* support for xml samples in response when there is no schema in response ([eb7089b](https://github.com/Rebilly/ReDoc/commit/eb7089b)), closes [#307](https://github.com/Rebilly/ReDoc/issues/307)\n\n\n\n<a name=\"1.16.0\"></a>\n# [1.16.0](https://github.com/Rebilly/ReDoc/compare/v1.15.0...v1.16.0) (2017-05-12)\n\n\n### Bug Fixes\n\n* do not show discriminator dropdown if it is empty ([7a5d315](https://github.com/Rebilly/ReDoc/commit/7a5d315))\n* prevent possible XSS using `untrusted-spec` option ([c0698bb](https://github.com/Rebilly/ReDoc/commit/c0698bb))\n* URL changes so fast ([131b437](https://github.com/Rebilly/ReDoc/commit/131b437)), closes [#252](https://github.com/Rebilly/ReDoc/issues/252)\n\n\n### Features\n\n* display xml examples if present in response examples ([cb106cc](https://github.com/Rebilly/ReDoc/commit/cb106cc))\n\n\n<a name=\"1.15.0\"></a>\n# [1.15.0](https://github.com/Rebilly/ReDoc/compare/v1.14.0...v1.15.0) (2017-05-05)\n\n\n### Bug Fixes\n\n* menu items not full-width on short item names ([ef1b2bd](https://github.com/Rebilly/ReDoc/commit/ef1b2bd))\n* menu service subscription leak ([bb00dc3](https://github.com/Rebilly/ReDoc/commit/bb00dc3))\n* openapi button: add `download` attribute ([583c571](https://github.com/Rebilly/ReDoc/commit/583c571))\n* sample unavailable when no schema in response object ([1eedbfe](https://github.com/Rebilly/ReDoc/commit/1eedbfe))\n* Slugifying non-ascii headers make duplicate permalinks ([#264](https://github.com/Rebilly/ReDoc/issues/264)) ([6edbbe7](https://github.com/Rebilly/ReDoc/commit/6edbbe7))\n* typo in download button classname (thanks [@dwilding](https://github.com/dwilding)) ([6b363a5](https://github.com/Rebilly/ReDoc/commit/6b363a5))\n* firefox and IE scroll sync after deps update ([ad04636](https://github.com/Rebilly/ReDoc/commit/ad04636))\n\n\n\n### Features\n\n* add triangle icon for expandable menu items ([e7130d2](https://github.com/Rebilly/ReDoc/commit/e7130d2))\n* clear button (x) in search box ([0341db4](https://github.com/Rebilly/ReDoc/commit/0341db4))\n\n\n<a name=\"1.14.0\"></a>\n# [1.14.0](https://github.com/Rebilly/ReDoc/compare/v1.13.0...v1.14.0) (2017-04-23)\n\n\n### Bug Fixes\n\n* don't show download button if initialized with an object ([476d6c4](https://github.com/Rebilly/ReDoc/commit/476d6c4))\n* endpoint link doesn't expand when click on arrow ([9248cc2](https://github.com/Rebilly/ReDoc/commit/9248cc2))\n* markdown block text color 💅 ([0f6f035](https://github.com/Rebilly/ReDoc/commit/0f6f035)), closes [#255](https://github.com/Rebilly/ReDoc/issues/255)\n* ReDoc removes path if site is using history API ([c77e1a2](https://github.com/Rebilly/ReDoc/commit/c77e1a2)), closes [#257](https://github.com/Rebilly/ReDoc/issues/257)\n* remove trailing slash from url when use `x-servers` ([2760a34](https://github.com/Rebilly/ReDoc/commit/2760a34))\n* subscription leak in side-menu ([838f233](https://github.com/Rebilly/ReDoc/commit/838f233))\n\n\n### Features\n\n* add GH-like anchors to h1 and h2 headings in md ([bb3667d](https://github.com/Rebilly/ReDoc/commit/bb3667d))\n* add perfect-scrollbar for side menu ([cdeee67](https://github.com/Rebilly/ReDoc/commit/cdeee67))\n* emphasize path with primary color in servers dropdown ([388b3d4](https://github.com/Rebilly/ReDoc/commit/388b3d4))\n* new option `path-in-middle-panel` ([74a3193](https://github.com/Rebilly/ReDoc/commit/74a3193))\n* SideMenu to support items template as a parameter ([8a49fb3](https://github.com/Rebilly/ReDoc/commit/8a49fb3))\n\n\n<a name=\"1.13.0\"></a>\n# 1.13.0 (2017-04-19)\n\n\n### Bug Fixes\n\n* fix issue with loading https spec ([585b9cf](https://github.com/Rebilly/ReDoc/commit/585b9cf)), closes [#243](https://github.com/Rebilly/ReDoc/issues/243) (by Khoa Tran)\n* UL missing css ([303b49e](https://github.com/Rebilly/ReDoc/commit/303b49e)), closes [#248](https://github.com/Rebilly/ReDoc/issues/248)\n* don't show contact info if it is empty object ([6077cc6](https://github.com/Rebilly/ReDoc/commit/6077cc6))\n* code block formatting in markdown list ([a9cad19](https://github.com/Rebilly/ReDoc/commit/a9cad19)), closes [#242](https://github.com/Rebilly/ReDoc/issues/242)\n\n### Features\n\n* HTTP verbs badges in side menu ([92eec25](https://github.com/Rebilly/ReDoc/commit/92eec25)), closes [#61](https://github.com/Rebilly/ReDoc/issues/61)\n* HTTP verbs badges in search results ([61fd426](https://github.com/Rebilly/ReDoc/commit/61fd426))\n* new option [`no-auto-auth`](https://github.com/Rebilly/ReDoc#redoc-tag-attributes) to disable authentication section auto adding ([00b304a](https://github.com/Rebilly/ReDoc/commit/00b304a))\n\n<a name=\"1.12.1\"></a>\n# 1.12.1 (2017-04-19)\n\n\n### Bug Fixes\n\n* fix: use replace state instead of pushState ([4f4e748](https://github.com/Rebilly/ReDoc/commit/4f4e748)), closes [#244](https://github.com/Rebilly/ReDoc/issues/244)\n\n<a name=\"1.12.0\"></a>\n# 1.12.0 (2017-04-19)\n\n\n### Bug Fixes\n\n* add safeguard for undefined ([aaac434](https://github.com/Rebilly/ReDoc/commit/aaac434)), closes [#236](https://github.com/Rebilly/ReDoc/issues/236)\n* view errors were not reported ([6aa3a7d](https://github.com/Rebilly/ReDoc/commit/6aa3a7d))\n\n### Features\n\n* Support x-examples vendor extension for requests (by [@brendo](https://github.com/brendo))\n\n### Other\n\n* Updated to Angular 4, bundle is a bit smaller now\n\n<a name=\"1.11.0\"></a>\n# 1.11.0 (2017-03-09)\n\n\n### Bug Fixes\n\n* do not hang when swagger doesn't contain any paths ([e4f5388](https://github.com/Rebilly/ReDoc/commit/e4f5388)), closes [#216](https://github.com/Rebilly/ReDoc/issues/216)\n[#201](https://github.com/Rebilly/ReDoc/issues/201)\n* optimize and support inherited discriminator ([64e5741](https://github.com/Rebilly/ReDoc/commit/64e5741))\n* redoc hangs when indexing recursive discriminator-based definitions ([1e96f88](https://github.com/Rebilly/ReDoc/commit/1e96f88))\n* wrong warnings for $ref not single ([193f4bf](https://github.com/Rebilly/ReDoc/commit/193f4bf)), closes [#221](https://github.com/Rebilly/ReDoc/issues/221)\n* x-extendedDiscriminator not working ([4899f3e](https://github.com/Rebilly/ReDoc/commit/4899f3e)), closes [#217](https://github.com/Rebilly/ReDoc/issues/217)\n\n\n### Features\n\n* copy pretty-printed JSON ([e99d66d](https://github.com/Rebilly/ReDoc/commit/e99d66d)), closes [#219](https://github.com/Rebilly/ReDoc/issues/219)\n* support for OpenAPI object as a parameter for `init` ([d99f256](https://github.com/Rebilly/ReDoc/commit/d99f256)), closes [#224](https://github.com/Rebilly/ReDoc/issues/224)\n\n<a name=\"1.10.2\"></a>\n## 1.10.2 (2017-03-01)\n\n### Bug Fixes\n* clear page fragment when scroll to the beginning\n* update docs for x-tagGroup, add warning [#215](https://github.com/Rebilly/ReDoc/issues/215)\n* show warning for non-used in tagGroup tags\n\n<a name=\"1.10.1\"></a>\n## 1.10.1 (2017-02-27)\n\n\n### Bug Fixes\n\n* improve x-servers dropdown animation performance ([69c7d98](https://github.com/Rebilly/ReDoc/commit/69c7d98))\n\n\n\n<a name=\"1.10.0\"></a>\n# 1.10.0 (2017-02-27)\n\n\n### Bug Fixes\n* Revert: remove unused hide-hostname option ([7031176](https://github.com/Rebilly/ReDoc/commit/7031176))\n\n### Features\n\n* new option `required-props-first` ([c724df4](https://github.com/Rebilly/ReDoc/commit/c724df4)), closes [#191](https://github.com/Rebilly/ReDoc/issues/191)\n* update fragment while scrolling and on menu clicks ([66c06b3](https://github.com/Rebilly/ReDoc/commit/66c06b3)), closes [#138](https://github.com/Rebilly/ReDoc/issues/138) [#202](https://github.com/Rebilly/ReDoc/issues/202)\n\n\n\n<a name=\"1.9.0\"></a>\n# 1.9.0 (2017-02-25)\n\n\n### Bug Fixes\n\n* do not crash if version is not string ([accd016](https://github.com/Rebilly/ReDoc/commit/accd016)), closes [#208](https://github.com/Rebilly/ReDoc/issues/208)\n* long paths break EndpointLink ui ([8472045](https://github.com/Rebilly/ReDoc/commit/8472045))\n* remove unused hide-hostname option ([7031176](https://github.com/Rebilly/ReDoc/commit/7031176))\n\n\n### Features\n\n* Add support for `x-servers` ([fd49082](https://github.com/Rebilly/ReDoc/commit/fd49082))\n* Color of \"default\" Response depends on other successful responses are specified ([9d0dd25](https://github.com/Rebilly/ReDoc/commit/9d0dd25)), closes [#197](https://github.com/Rebilly/ReDoc/issues/197)\n* improved type string with minLength == maxLength ([e76bcc3](https://github.com/Rebilly/ReDoc/commit/e76bcc3)), closes [#212](https://github.com/Rebilly/ReDoc/issues/212)\n* show type string with minLength 1 as \"non-empty\" ([d175a4d](https://github.com/Rebilly/ReDoc/commit/d175a4d)), closes [#192](https://github.com/Rebilly/ReDoc/issues/192)\n\n\n\n<a name=\"1.8.1\"></a>\n## 1.8.1 (2017-02-23)\n\n\n### Bug Fixes\n* Fix toggle icon width on IE, closes [#198](https://github.com/Rebilly/ReDoc/issues/198)\n* Add safe guards array without items, closes [#199](https://github.com/Rebilly/ReDoc/issues/199)\n* Fix extra slash if basePath is not present ([a5c03ab](https://github.com/Rebilly/ReDoc/commit/a5c03ab)), closes [#201](https://github.com/Rebilly/ReDoc/issues/201)\n* response samples - render description as markdown ([4acfc11](https://github.com/Rebilly/ReDoc/commit/4acfc11)), closes [#190](https://github.com/Rebilly/ReDoc/issues/190)\n* take snapshot of schema to not overwrite inlined references ([77bc3c4](https://github.com/Rebilly/ReDoc/commit/77bc3c4)), closes [#203](https://github.com/Rebilly/ReDoc/issues/203)\n* use items description if not present on top level ([23e7847](https://github.com/Rebilly/ReDoc/commit/23e7847))\n\n\n### Features\n\n* autoscroll menu ([b43a87d](https://github.com/Rebilly/ReDoc/commit/b43a87d))\n\n\n# 1.8.0 (2017-02-03)\n### Features/Improvements\n* In-page search :tada: []#51](https://github.com/Rebilly/ReDoc/issues/51)\n* Render externalDocs [#103](https://github.com/Rebilly/ReDoc/issues/103)\n* Undeprecate x-traitTag\n\n### Bug fixes\n* Tags with x-traitTag: true are now greyed out in ReDoc output bug [#194](https://github.com/Rebilly/ReDoc/issues/194)\n* CSS: request body model-tree wrapping problem [#185](https://github.com/Rebilly/ReDoc/issues/185)\n* Strange request to `example.com` causing CSP error [#178](https://github.com/Rebilly/ReDoc/issues/178)\n* Fix latest empty menu-items not getting active [#194](https://github.com/Rebilly/ReDoc/issues/194)\n* Fixed crash when level-2 heading goes before level-1 in description [#179](https://github.com/Rebilly/ReDoc/issues/179) (by [@jsmartfo](https://github.com/jsmartfo))\n\n# 1.7.0 (2017-01-06)\n### Features/Improvements\n* Add support for grouping items in menu via [`x-tagGroups`](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md#x-taggroups)\n* Support inherited discriminator (only one at the moment)\n* Add support for second-level headings from Markdown docs (by [@jaingaurav](https://github.com/jaingaurav))\n\n### Bug fixes\n* Fix response list for shared schemas (fixes [#177](https://github.com/Rebilly/ReDoc/issues/177))\n* Fix right panel overlaps site-footer\n\n# 1.6.4 (2016-12-28)\n### Bug fixes\n* Fix crash on MS Edge (fixes [#166](https://github.com/Rebilly/ReDoc/issues/166))\n* Uncomment animation after upgrade to the latest ng2 (resolves [#162](https://github.com/Rebilly/ReDoc/issues/162))\n\n# 1.6.3 (2016-12-19)\n### Bug fixes\n* Disable side-menu animation (workaround for [#162](https://github.com/Rebilly/ReDoc/issues/162))\n* Use markdown for response description (fixes [#158](https://github.com/Rebilly/ReDoc/issues/158))\n* Fix leaks (fixes [#167](https://github.com/Rebilly/ReDoc/issues/167))\n* Update webpack and stick to ts@2.0.9 (fixes [#169](https://github.com/Rebilly/ReDoc/issues/169), [#168](https://github.com/Rebilly/ReDoc/issues/168))\n\n### Features/Improvements\n* add `expand-responses` option - specify which responses are expand by default ([#165](https://github.com/Rebilly/ReDoc/issues/165)).\n\n# 1.6.2 (2016-12-11)\n### Bug fixes\n* Use markdown in responses description ([#158](https://github.com/Rebilly/ReDoc/issues/158))\n\n### Features/Improvements\n* [x-displayName](https://github.com/Rebilly/ReDoc/blob/master/docs/redoc-vendor-extensions.md#x-displayname) for tags - by [@bfirsh](https://github.com/bfirsh) ([PR #152](https://github.com/Rebilly/ReDoc/pull/152))\n\n# 1.6.1 (2016-12-02)\n### Bug fixes\n* Fix only the first instance of schema was rendered ([#150](https://github.com/Rebilly/ReDoc/issues/150))\n* Regression: fix side panel overlaps footer\n* Fix menu was not initialized for specs without tags\n\n### Features/Improvements\n* Don't show error screen for runtimes after render finished\n* Updated dependencies (angular to the latest version + dev deps)\n\n\n# 1.6.0 (2016-11-30)\n### Bug fixes\n* Update webpack to the latest beta ([#143](https://github.com/Rebilly/ReDoc/issues/143))\n* Fix read-only fields appear in request samples ([#142](https://github.com/Rebilly/ReDoc/issues/142))\n* A few more minor UI improvements\n\n### Features/Improvements\n* Major performance optimization with new option `lazy-rendering`\n\nTo enable use `<redoc>` tag parameter: `<redoc spec-url=\"...\" lazy-rendering></redoc>`.\nIn this mode ReDoc shows initial screen ASAP and then renders the rest operations asynchronously while showing progress bar on the top. Check out [the demo](//rebilly.github.io/ReDoc) for the example.\n* Enable cors-proxy for demo\n* README: Add button link to yeoman-generator\n\n# 1.5.2 (2016-11-28)\n### Bug fixes\n* Fix crashing on array without items ([#104](https://github.com/Rebilly/ReDoc/issues/104))\n* Fix `allOf` within array items ([#136](https://github.com/Rebilly/ReDoc/issues/136))\n* Fix reference resolution from external files ([#96](https://github.com/Rebilly/ReDoc/issues/96))\n* Fix object to become an array ([#146](https://github.com/Rebilly/ReDoc/issues/146))\n\n### Features/Improvements\n* Add support for Swagger `collectionFormat`\n* Wrap API version in span with class ([#145](https://github.com/Rebilly/ReDoc/issues/145))\n* Update openapi-sampler to 0.3.3\n\n# 1.5.1 (2016-10-31)\n### Bug fixes\n* Fix content scrolling on language switch ([#130](https://github.com/Rebilly/ReDoc/issues/130))\n\n### Features/Improvements\n* Support for Swagger `pattern` property ([#42](https://github.com/Rebilly/ReDoc/issues/42))\n* Add option to hide hostname in method definition (by @bfirsh)\n* Add Docker development environment (by @bfirsh)\n\n# 1.5.0 (2016-10-31)\n### Bug fixes\n* Fix side menu items wrong sync with description headers\n\n### Features/Improvements\n* Support for Security Definitions\n* Update angular2 to the 2.1.2\n\n### Deprecations\n* Deprecate `x-traitTag`\n\n### Code refactoring\n* Separate RedocModule from AppModule\n* Get rid of angular facade/lang dependencies\n* Error handler refactor\n\n# 1.4.1 (2016-10-18)\n### Bug fixes\n* Emit helpers for module build\n\n# 1.4.0 (2016-10-14)\n### Bug fixes\n* Fix destroy/reinit\n* Fix minimum/maximum zero not rendered ([#123](https://github.com/Rebilly/ReDoc/issues/123))\n\n### Features/Improvements\n* Do spec load after bootstrap\n* Build and publish angular2 module ([#126](https://github.com/Rebilly/ReDoc/issues/126))\n\n# 1.3.3 (2016-09-28)\n### Features/Improvements\n* Implemented x-extendedDiscriminator to workaround name clashes in big specs\n* Add engines to package.json ([#83](https://github.com/Rebilly/ReDoc/issues/83))\n* Fix npm start on windows ([#119](https://github.com/Rebilly/ReDoc/issues/119), [#118](https://github.com/Rebilly/ReDoc/issues/118))\n* Update webpack to latest beta\n* Update angular to 2.0.1\n* Update local dev steps\n* Update openapi-sampler lib ([#111](https://github.com/Rebilly/ReDoc/issues/111))\n\n# 1.3.2 (2016-09-13)\n### Bug fixes\n* Fix broken tabs styling for response samples\n* Fix v1.x.x deployment\n\n# 1.3.1 (2016-09-13)\n### Bug fixes\n* Makes basePath optional (by @LeFnord)\n* Fixed little typo (by @adamd)\n* Typo s/IGNORRED/IGNORED (by @MikeRalphson)\n* Fixed indentation (by @bennyn)\n* Fix default hostname ([#108](https://github.com/Rebilly/ReDoc/issues/108))\n* Fix default value for falsy values is not displayed ([#109](https://github.com/Rebilly/ReDoc/issues/109))\n* Fix schema collapse after change discriminator\n\n### Features/Improvements\n* Update to latest Angular RC.6\n* Smaller bundle size by removing esprima dep from bundle\n* Updated dependencies\n\n# 1.3.0 (2016-08-31)\n### Bug fixes\n* Fix code samples are not shown for operations without body param ([#93](https://github.com/Rebilly/ReDoc/issues/93))\n* Fixed side menu overlapped site footer ([#75](https://github.com/Rebilly/ReDoc/issues/75))\n* Fix broken order in discriminator dropdown\n\n### Features/Improvements\n* Support \"x-nullable\" property by @kedashoe ([#92](https://github.com/Rebilly/ReDoc/issues/92))\n\n# 1.2.0 (2016-08-30)\n### Bug fixes\n* Fix sticky sidebar top sticking ([#75](https://github.com/Rebilly/ReDoc/issues/75))\n* Fix array inside objects if referenced directly ([#84](https://github.com/Rebilly/ReDoc/issues/84))\n* Add banner to the bundle file ([#89](https://github.com/Rebilly/ReDoc/issues/89))\n* Fix broken additionalProperties\n* Fix version render issue (extra \"v\" letter)\n\n### Features/Improvements\n* Change the way discriminator is rendered\n* Created CDN major release 1.x.x ([#87](https://github.com/Rebilly/ReDoc/issues/87))\n* Smaller bundle size (371KB gzipped)\n* Better start-up time due to [AoT](http://blog.mgechev.com/2016/08/14/ahead-of-time-compilation-angular-offline-precompilation/)\n\n### Code refactoring\n* Moved build-system to Webpack\n* Moved to latest Typescript + get rid of typings\n* Upgrade to the latest Angular2 RC.5\n\n# 1.1.2 (2016-08-21)\n### Bug fixes\n* Revert \"Fix markdown newlines to be GFM\" ([#82](https://github.com/Rebilly/ReDoc/issues/82))\n* Move license and contact info above description\n\n# 1.1.1 (2016-08-21)\n### Bug fixes\n* Fix markdown newlines to be GFM ([#82](https://github.com/Rebilly/ReDoc/issues/82))\n* Fix markdown code blocks in api description\n\n# 1.1.0 (2016-08-12)\n### Bug fixes\n\n* Fix API description width on mobile\n* Render valid JSON in samples (quoted object keys)\n\n### Features/Improvements\n\n* Add Tuple support (arrays with separate schema for each value) ([#69](https://github.com/Rebilly/ReDoc/issues/69))\n* Add special representation for enum with one value ([#70](https://github.com/Rebilly/ReDoc/issues/70))\n* Change `< * >` notation to `< anything >`\n\n\n# 1.0.1 (2016-08-01)\n### Bug fixes\n\n* Use api host if schema host is undefined\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015-present, Rebilly, Inc. \n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\">\n  <img alt=\"Redoc logo\" src=\"https://raw.githubusercontent.com/Redocly/redoc/main//docs/images/redoc.png\" width=\"400px\" />\n\n# Generate beautiful API documentation from OpenAPI\n\n  [![npm](http://img.shields.io/npm/v/redoc.svg)](https://www.npmjs.com/package/redoc) [![License](https://img.shields.io/npm/l/redoc.svg)](https://github.com/Redocly/redoc/blob/main/LICENSE)\n\n  [![bundle size](http://img.badgesize.io/https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js?compression=gzip&max=300000)](https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js) [![npm](https://img.shields.io/npm/dm/redoc.svg)](https://www.npmjs.com/package/redoc) [![jsDelivr status](https://data.jsdelivr.com/v1/package/npm/redoc/badge)](https://www.jsdelivr.com/package/npm/redoc)\n</div>\n\n\n## About Redoc\n\nRedoc is an open source tool for generating documentation from OpenAPI (formerly Swagger) definitions.\n\nBy default Redoc offers a three-panel, responsive layout:\n\n- The left panel contains a search bar and navigation menu.\n- The central panel contains the documentation.\n- The right panel contains request and response examples.\n\n![Redoc demo](https://raw.githubusercontent.com/Redocly/redoc/main/demo/redoc-demo.png)\n\n## Live demo\n\nIf you want to see how Redoc renders your OpenAPI definition,\nyou can try it out online at https://redocly.github.io/redoc/.\n\nA version of the Swagger Petstore API is displayed by default.\nTo test it with your own OpenAPI definition,\nenter the URL for your definition and select **TRY IT**.\n\n## Redoc features\n\n- Responsive three-panel design with menu/scrolling synchronization\n- Support for OpenAPI 3.1, OpenAPI 3.0, and Swagger 2.0\n- Ability to integrate your API introduction into the side menu\n- High-level grouping in side menu with the [`x-tagGroups`](https://redocly.com/docs/api-reference-docs/specification-extensions/x-tag-groups/) specification extension\n- [Simple integration with `create-react-app`](https://redocly.com/docs/redoc/quickstart/react/)\n- Code samples support (with vendor extension) <br>\n  ![code samples in action](docs/images/code-samples-demo.gif)\n\n## Usage\n\nRedoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, and React component.\n\n### Generate documentation from the CLI\n\nIf you have Node installed, quickly generate documentation using `npx`:\n\n```bash\nnpx @redocly/cli build-docs openapi.yaml\n```\n\nThe tool outputs by default to a file named `redoc-static.html` that you can open in your browser.\n\n> [Redocly CLI](https://github.com/Redocly/redocly-cli/) does more than docs; check it out and add linting, bundling, and more to your API workflow.\n\n### Add an HTML element to the page\n\nCreate an HTML page, or edit an existing one, and add the following within the body tags:\n\n```html\n    <redoc spec-url=\"http://petstore.swagger.io/v2/swagger.json\"></redoc>\n    <script src=\"https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\"> </script>\n```\n\nOpen the HTML file in your browser, and your API documentation is shown on the page.\n\nAdd your own `spec-url` to the `<redoc>` tag; this attribute can also be a local file. The JavaScript library can also be installed locally using `npm` and served from your own server, see the [HTML deployment documentation](https://redocly.com/docs/redoc/deployment/html/) for more details.\n\n### More usage options\n\nCheck out the [deployment documentation](./docs/deployment/intro.md) for more options, and detailed documentation for each.\n\n## Redoc vs. Redocly API Reference\n\nRedoc is Redocly's community-edition product. Looking for something more?\nWe also offer [hosted API reference documentation](https://redocly.com/docs/api-registry/guides/api-registry-quickstart/)\nwith additional features including:\n\n* Try-it console\n* Automated code samples\n* Pagination\n* Extra theme options\n\n### Documentation and resources\n\n- [Reference docs](https://redocly.com/docs/api-reference-docs/getting-started/) - we take care of the hosting\n- [Redoc](https://redocly.com/docs/redoc/) - detailed documentation for this open source project (also in the `docs/` folder)\n- [Command-line interface to bundle your docs into a web-ready HTML file](https://redocly.com/docs/cli/commands/build-docs/)\n- API linting, bundling, and much more with open source [Redocly CLI](https://redocly.com/docs/cli)\n\n## Showcase\n\nA sample of the organizations using Redocly tools in the wild:\n\n- [Rebilly](https://api-reference.rebilly.com/)\n- [Docker Engine](https://docs.docker.com/engine/api/v1.25/)\n- [Zuora](https://www.zuora.com/developer/api-reference/)\n- [Discourse](http://docs.discourse.org)\n- [Commbox](https://www.commbox.io/api/)\n- [APIs.guru](https://apis.guru/api-doc/)\n- [BoxKnight](https://www.docs.boxknight.com/)\n- [Quaderno API](https://developers.quaderno.io/api)\n\n_Pull requests to add your own API page to the list are welcome_\n\n## Configuration\n\nRedoc is highly configurable, see the [configuration documentation](docs/config.md) for details.\n\n### OpenAPI specification extensions\nRedoc uses the following [specification extensions](https://redocly.com/docs/api-reference-docs/spec-extensions/):\n\n* [`x-logo`](docs/redoc-vendor-extensions.md#x-logo) - is used to specify API logo\n* [`x-traitTag`](docs/redoc-vendor-extensions.md#x-traitTag) - useful for tags that refer to non-navigation properties like Pagination, Rate-Limits, etc\n* [`x-codeSamples`](docs/redoc-vendor-extensions.md#x-codeSamples) - specify operation code samples\n* [`x-badges`](docs/redoc-vendor-extensions.md#x-badges) - specify operation badges\n* [`x-examples`](docs/redoc-vendor-extensions.md#x-examples) - specify JSON example for requests\n* [`x-nullable`](docs/redoc-vendor-extensions.md#x-nullable) - mark schema param as a nullable\n* [`x-displayName`](docs/redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories\n* [`x-tagGroups`](docs/redoc-vendor-extensions.md#x-tagGroups) - group tags by categories in the side menu\n* [`x-servers`](docs/redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)\n* [`x-additionalPropertiesName`](docs/redoc-vendor-extensions.md#x-additionalPropertiesName) - ability to supply a descriptive name for the additional property keys\n* [`x-summary`](docs/redoc-vendor-extensions.md#x-summary) - for Response object, use as the response button text, with description rendered under the button\n* [`x-explicitMappingOnly`](docs/redoc-vendor-extensions.md#x-explicitMappingOnly) - in Schemas, display a more descriptive property name in objects with additionalProperties when viewing the property list with an object\n\n## Releases\n\n**The README for the `1.x` version is on the [v1.x](https://github.com/Redocly/redoc/tree/v1.x) branch.**\n\nAll the 2.x releases are deployed to npm and can be used with Redocly-cdn:\n- particular release, for example, `v2.0.0`: https://cdn.redoc.ly/redoc/v2.0.0/bundles/redoc.standalone.js\n- `latest` release: https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\n\nAdditionally, all the 1.x releases are hosted on our GitHub Pages-based CDN **(deprecated)**:\n- particular release, for example `v1.2.0`: https://rebilly.github.io/ReDoc/releases/v1.2.0/redoc.min.js\n- `v1.x.x` release: https://rebilly.github.io/ReDoc/releases/v1.x.x/redoc.min.js\n- `latest` release: https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js - points to latest 1.x.x release since 2.x releases are not hosted on this CDN but on unpkg.\n\n\n## Development\nsee [CONTRIBUTING.md](.github/CONTRIBUTING.md)\n"
  },
  {
    "path": "benchmark/benchmark.js",
    "content": "const beautifyBenchmark = require('beautify-benchmark');\nconst sh = require('shelljs');\nconst fs = require('fs');\nconst pathJoin = require('path').join;\nconst spawn = require('child_process').spawn;\nconst puppeteer = require('puppeteer');\n\nconst args = process.argv.slice(2);\nargs[0] = args[0] || 'HEAD';\nargs[1] = args[1] || 'local';\n\nlet started = false;\n\nconsole.log('Benchmarking revisions: ' + args.join(', '));\n\nconst localDistDir = './benchmark/revisions/local/bundles';\nsh.rm('-rf', localDistDir);\nconsole.log(`Building local dist: ${localDistDir}`);\nsh.mkdir('-p', localDistDir);\nexec(`npm run bundle:lib --output-path ${localDistDir}`);\n\nconst revisions = [];\nfor (const arg of args) {\n  revisions.push({ name: arg, path: buildRevisionDist(arg) });\n}\n\nconst configFile = `\n  export const revisions = [ ${revisions.map(rev => JSON.stringify(rev)).join(', ')} ];\n`;\n\nconst configDir = './benchmark/revisions/config.js';\nconsole.log(`Writing config \"${configDir}\"`);\nfs.writeFileSync(configDir, configFile);\n\nconsole.log('Starting benchmark server');\nconst proc = spawn('npm', ['run', 'start:benchmark']);\n\nproc.stdout.on('data', data => {\n  if (data.toString().indexOf('Compiled successfully') > -1) {\n    console.log('Server started');\n    startBenchmark();\n  }\n});\n\nproc.stderr.on('data', data => {\n  console.error(data.toString());\n});\n\nproc.on('close', code => {\n  console.log(`Benchmark server stopped with code ${code}`);\n});\n\nasync function runPuppeteer() {\n  return await puppeteer\n    .launch({ args: ['--no-sandbox', '--disable-setuid-sandbox'] })\n    .then(async browser => {\n      const page = await browser.newPage();\n      let resolve;\n      const prom = new Promise(_resolve => {\n        resolve = _resolve;\n      });\n      page.on('console', async msg => {\n        const args = msg.args();\n        const obj = args.length > 0 && (await args[0].jsonValue());\n        if (!obj) return;\n\n        if (obj.done) {\n          beautifyBenchmark.log();\n          // resolve(obj);\n        } else if (obj.cycle) {\n          beautifyBenchmark.add(obj.cycle);\n        } else if (obj.allDone) {\n          resolve();\n        } else {\n          console.log(obj);\n        }\n      });\n      await page.goto('http://127.0.0.1:9090', { timeout: 0 });\n      const res = await prom;\n      await browser.close();\n      return res;\n    });\n}\n\nasync function startBenchmark() {\n  if (started) return;\n  started = true;\n  console.log('Starting benchmarks');\n  await runPuppeteer();\n\n  console.log('Killing benchmark server');\n  proc.kill('SIGINT');\n}\n\nfunction exec(command) {\n  const { code, stdout, stderr } = sh.exec(command, { silent: true });\n  if (code !== 0) {\n    console.error(stdout);\n    console.error(stderr);\n    sh.exit(code);\n  }\n  return stdout.trim();\n}\n\nfunction buildRevisionDist(revision) {\n  if (revision === 'local') {\n    return localDistDir;\n  }\n  const hash = exec(`git log -1 --format=%h \"${revision}\"`);\n  const buildDir = './benchmark/revisions/' + hash;\n  const distDir = buildDir + '/bundles';\n  if (sh.test('-d', distDir)) {\n    console.log(`Using prebuilt \"${revision}\"(${hash}) revision: ${buildDir}`);\n    return distDir;\n  }\n  console.log(`Building \"${revision}\"(${hash}) revision: ${buildDir}`);\n  sh.mkdir('-p', buildDir);\n  exec(`git archive \"${hash}\" | tar -xC \"${buildDir}\"`);\n\n  const pwd = sh.pwd();\n  sh.cd(buildDir);\n  exec('npm uninstall cypress puppeteer && npm install && npm run bundle:lib');\n  sh.cd(pwd);\n  return distDir;\n}\n"
  },
  {
    "path": "benchmark/index.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n  <meta charset=\"UTF-8\" />\n  <title>ReDoc</title>\n  <style>\n    body {\n      margin: 0;\n      padding: 0;\n    }\n\n    redoc {\n      display: block;\n    }\n  </style>\n  <link href=\"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700\" rel=\"stylesheet\">\n</head>\n\n<body>\n  <redoc id=\"example\"></redoc>\n  <!-- <redoc spec-url=\"./openapi.yaml\"></redoc> -->\n  <script src=\"https://unpkg.com/lodash@4.17.4/lodash.js\"></script>\n  <script src=\"https://unpkg.com/benchmark@2.1.4/benchmark.js\"></script>\n  <!-- <script src=\"../bundles/redoc.standalone.js\"></script> -->\n</body>\n\n</html>"
  },
  {
    "path": "benchmark/index.tsx",
    "content": "import * as React from 'react';\nimport { render, unmountComponentAtNode } from 'react-dom';\n\nimport { Redoc, RedocProps } from '../src/components';\n\nimport { loadAndBundleSpec } from '../src/utils';\n\nimport { revisions } from './revisions/config';\nimport { configure } from 'mobx';\n\ndeclare var Benchmark;\n\nconfigure({\n  isolateGlobalState: true,\n});\n\nconst node = document.getElementById('example');\n\nconst renderRoot = (Component: typeof Redoc, props: RedocProps) =>\n  render(<Component {...props} />, node!);\n\nasync function importRedocs() {\n  return Promise.all(\n    revisions.map(rev => {\n      return import('./' + rev.path.substring(12) + '/redoc.lib.js');\n    }),\n  );\n}\n\nfunction startFullTime(redocs, resolvedSpec) {\n  return new Promise(async resolve => {\n    const suite = new Benchmark.Suite('Full time', {\n      maxTime: 20,\n      initCount: 2,\n      onStart(event) {\n        console.log('  ⏱️  ' + event.currentTarget.name);\n      },\n      onCycle(event) {\n        console.log({ cycle: event.target });\n      },\n      onComplete() {\n        console.log({ done: true });\n        setTimeout(() => resolve(), 10);\n      },\n    });\n\n    revisions.forEach((rev, idx) => {\n      const redoc = redocs[idx];\n      suite.add(rev.name, () => {\n        const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml');\n        renderRoot(redoc.Redoc, { store });\n        unmountComponentAtNode(node!);\n      });\n    });\n\n    suite.run({ async: true });\n  });\n}\n\nfunction startInitStore(redocs, resolvedSpec) {\n  return new Promise(async resolve => {\n    const suite = new Benchmark.Suite('Create Store Time', {\n      maxTime: 20,\n      initCount: 2,\n      onStart(event) {\n        console.log('  ⏱️  ' + event.currentTarget.name);\n      },\n      onCycle(event) {\n        console.log({ cycle: event.target });\n      },\n      onComplete() {\n        console.log({ done: true });\n        setTimeout(() => resolve(), 10);\n      },\n    });\n\n    revisions.forEach((rev, idx) => {\n      const redoc = redocs[idx];\n      suite.add(rev.name, () => {\n        const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml');\n        store.dispose();\n      });\n    });\n\n    suite.run({ async: true });\n  });\n}\n\nfunction startRenderTime(redocs, resolvedSpec) {\n  return new Promise(async resolve => {\n    const suite = new Benchmark.Suite('Render time', {\n      maxTime: 20,\n      initCount: 2,\n      onStart(event) {\n        console.log('  ⏱️  ' + event.currentTarget.name);\n      },\n      onCycle(event) {\n        console.log({ cycle: event.target });\n        unmountComponentAtNode(node!);\n      },\n      onComplete() {\n        console.log({ done: true });\n        setTimeout(() => resolve(), 10);\n      },\n    });\n\n    revisions.forEach((rev, idx) => {\n      const redoc = redocs[idx];\n      const store = new redoc.AppStore(resolvedSpec, 'openapi.yaml');\n      suite.add(rev.name, () => {\n        renderRoot(redoc.Redoc, { store });\n      });\n    });\n\n    suite.run({ async: true });\n  });\n}\n\nasync function runBenchmarks() {\n  const redocs: any[] = await importRedocs();\n  const resolvedSpec = await loadAndBundleSpec('openapi.yaml');\n  await startInitStore(redocs, resolvedSpec);\n  await startRenderTime(redocs, resolvedSpec);\n  await startFullTime(redocs, resolvedSpec);\n  console.log({ allDone: true });\n}\n\nrunBenchmarks();\n"
  },
  {
    "path": "config/docker/Dockerfile",
    "content": "# To run:\n# docker build -t redoc .\n# docker run -it --rm -p 80:80 -e SPEC_URL='http://localhost:8000/swagger.yaml' redoc\n# Ensure http://localhost:8000/swagger.yaml is served with cors. A good solution is:\n# npm i -g http-server\n# http-server -p 8000 --cors\n\nFROM node:18-alpine\n\nRUN apk update && apk add --no-cache git\n\n# Install dependencies\nWORKDIR /build\nCOPY package.json package-lock.json /build/\nRUN npm ci --no-optional --ignore-scripts\nRUN npm explore esbuild -- npm run postinstall\n\n# copy only required for the build files\nCOPY src /build/src\nCOPY webpack.config.ts tsconfig.json custom.d.ts  /build/\nCOPY config/webpack-utils.ts /build/config/\nCOPY typings/styled-patch.d.ts /build/typings/styled-patch.d.ts\n\nRUN npm run bundle:standalone\n\nFROM nginx:alpine\n\nENV PAGE_TITLE=\"ReDoc\"\nENV PAGE_FAVICON=\"favicon.png\"\nENV BASE_PATH=\nENV SPEC_URL=\"http://petstore.swagger.io/v2/swagger.json\"\nENV PORT=80\nENV REDOC_OPTIONS=\n\n# copy files to the nginx folder\nCOPY --from=0 build/bundles /usr/share/nginx/html\nCOPY config/docker/index.tpl.html /usr/share/nginx/html/index.html\nCOPY demo/favicon.png /usr/share/nginx/html/\nCOPY config/docker/nginx.conf /etc/nginx/\nCOPY config/docker/docker-run.sh /usr/local/bin\n\n# Provide rights to the root group to write to nginx repositories (needed to run in OpenShift)\nRUN chgrp -R 0 /etc/nginx && \\\n    chgrp -R 0 /usr/share/nginx/html && \\\n    chgrp -R 0 /var/cache/nginx && \\\n    chgrp -R 0 /var/log/nginx && \\\n    chgrp -R 0 /var/run && \\\n    chmod -R g+rwX /etc/nginx && \\\n    chmod -R g+rwX /usr/share/nginx/html && \\\n    chmod -R g+rwX /var/cache/nginx && \\\n    chmod -R g+rwX /var/log/nginx && \\\n    chmod -R g+rwX /var/run\n\nEXPOSE 80\n\nCMD [\"sh\", \"/usr/local/bin/docker-run.sh\"]\n"
  },
  {
    "path": "config/docker/README.md",
    "content": "# Official ReDoc Docker Image\n\n## Usage\n\n### Docker\n\nServe remote spec by URL:\n\n    docker run -it --rm -p 80:80 \\\n      -e SPEC_URL='http://localhost:8000/swagger.yaml' redocly/redoc\n\nServe local file:\n\n    docker run -it --rm -p 80:80 \\\n      -v $(pwd)/demo/swagger.yaml:/usr/share/nginx/html/swagger.yaml \\\n      -e SPEC_URL=swagger.yaml redocly/redoc\n\nServe local file and watch for updates:\n\n    docker run -it --rm -p 80:80 \\\n      -v $(pwd)/demo/:/usr/share/nginx/html/swagger/ \\\n      -e SPEC_URL=swagger/swagger.yaml redocly/redoc\n\n### OpenShift\n\nTo quote [OpenShift Container Platform-Specific Guidelines](https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines):\n\n> Support Arbitrary User IDs\n>\n> By default, OpenShift Container Platform runs containers using an arbitrarily assigned user ID. This provides additional security against processes escaping the container due to a container engine vulnerability and thereby achieving escalated permissions on the host node.\n>\n> For an image to support running as an arbitrary user, directories and files that may be written to by processes in the image should be owned by the root group and be read/writable by that group. Files to be executed should also have group execute permissions.\n\nTo comply with those requirements the `Dockerfile` contains instructions to adapt the rights for the folders:\n\n- `/etc/nginx` because the `docker-run.sh` script modifies it at startup time\n- `/usr/share/nginx/html` because the `docker-run.sh` script modifies it at startup time\n- `/var/cache/nginx` because the Nginx process writes to it\n- `/var/log/nginx` because the Nginx process writes to it\n- `/var/run` because the Nginx process writes to it\n\nAnother issue with OpenShift is that the default exposed port `80` cannot be used as it is restricted. So one needs to use another port like `8080` (using the `PORT` configuration as described below), and then to configure the `container spec` accordingly.\n\n## Runtime configuration options\n\n- `PAGE_TITLE` (default `\"ReDoc\"`) - page title\n- `PAGE_FAVICON` (default `\"favicon.png\"`) - URL to page favicon\n- `BASE_PATH` (optional) - prepend favicon & standalone bundle with this path\n- `SPEC_URL` (default `\"http://petstore.swagger.io/v2/swagger.json\"`) - URL to spec\n- `PORT` (default `80`) - nginx port\n- `REDOC_OPTIONS` (optional) - [`<redoc>` tag attributes](https://github.com/Redocly/redoc#redoc-tag-attributes)\n\n## Build\n\n    docker build -t redocly/redoc .\n"
  },
  {
    "path": "config/docker/docker-run.sh",
    "content": "#!/bin/sh\n\nset -e\n\nsed -i -e \"s|%PAGE_TITLE%|$PAGE_TITLE|g\" /usr/share/nginx/html/index.html\nsed -i -e \"s|%PAGE_FAVICON%|$PAGE_FAVICON|g\" /usr/share/nginx/html/index.html\nsed -i -e \"s|%BASE_PATH%|$BASE_PATH|g\" /usr/share/nginx/html/index.html\nsed -i -e \"s|%SPEC_URL%|$SPEC_URL|g\" /usr/share/nginx/html/index.html\nsed -i -e \"s|%REDOC_OPTIONS%|${REDOC_OPTIONS}|g\" /usr/share/nginx/html/index.html\nsed -i -e \"s|\\(listen\\s*\\) [0-9]*|\\1 ${PORT}|g\" /etc/nginx/nginx.conf\n\nexec nginx -g 'daemon off;'\n"
  },
  {
    "path": "config/docker/hooks/build",
    "content": "#!/bin/bash\n\n# DockerHub cd into Dockerfile location before build\n# So we have to undo this.\ncd ../..\ndocker build -f config/docker/Dockerfile -t $IMAGE_NAME .\n"
  },
  {
    "path": "config/docker/index.tpl.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <title>%PAGE_TITLE%</title>\n    <link rel=\"icon\" href=\"%BASE_PATH%%PAGE_FAVICON%\" />\n    <style>\n      body {\n        margin: 0;\n        padding: 0;\n      }\n\n      redoc {\n        display: block;\n      }\n    </style>\n    <link\n      href=\"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700\"\n      rel=\"stylesheet\"\n    />\n  </head>\n\n  <body>\n    <redoc spec-url=\"%SPEC_URL%\" %REDOC_OPTIONS%></redoc>\n    <script src=\"%BASE_PATH%redoc.standalone.js\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "config/docker/nginx.conf",
    "content": "worker_processes      1;\n\nevents {\n  worker_connections  1024;\n}\n\nhttp {\n  include             mime.types;\n  default_type        application/octet-stream;\n\n  sendfile on;\n\n  keepalive_timeout   65;\n\n  server {\n    listen            80;\n    server_name       localhost;\n    index             index.html index.htm;\n\n    location / {\n      alias            /usr/share/nginx/html/;\n\n      if ($request_method = 'OPTIONS') {\n          # Add security headers\n          add_header 'X-Frame-Options' 'deny always';\n          add_header 'X-XSS-Protection' '\"1; mode=block\" always';\n          add_header 'X-Content-Type-Options' 'nosniff always';\n          add_header 'Referrer-Policy' 'strict-origin-when-cross-origin';\n\n          # Set access control header\n          add_header 'Access-Control-Allow-Origin' '*';\n          add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';\n          #\n          # Custom headers and headers various browsers *should* be OK with but aren't\n          #\n          add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';\n          #\n          # Tell client that this pre-flight info is valid for 20 days\n          #\n          add_header 'Access-Control-Max-Age' 1728000;\n          add_header 'Content-Type' 'text/plain charset=UTF-8';\n          add_header 'Content-Length' 0;\n          return 204;\n      }\n      if ($request_method = 'POST') {\n          # Add security headers\n          add_header 'X-Frame-Options' 'deny always';\n          add_header 'X-XSS-Protection' '\"1; mode=block\" always';\n          add_header 'X-Content-Type-Options' 'nosniff always';\n          add_header 'Referrer-Policy' 'strict-origin-when-cross-origin';\n\n          # Set access control header\n          add_header 'Access-Control-Allow-Origin' '*';\n          add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';\n          add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';\n      }\n      if ($request_method = 'GET') {\n          # Add security headers\n          add_header 'X-Frame-Options' 'deny always';\n          add_header 'X-XSS-Protection' '\"1; mode=block\" always';\n          add_header 'X-Content-Type-Options' 'nosniff always';\n          add_header 'Referrer-Policy' 'strict-origin-when-cross-origin';\n\n          # Set access control header\n          add_header 'Access-Control-Allow-Origin' '*';\n          add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';\n          add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "config/webpack-utils.ts",
    "content": "import * as webpack from 'webpack';\n\nexport function webpackIgnore(regexp) {\n  return new webpack.NormalModuleReplacementPlugin(regexp, require.resolve('lodash.noop'));\n}\n"
  },
  {
    "path": "custom.d.ts",
    "content": "/// <reference path=\"typings/styled-patch.d.ts\" />\n\ndeclare module '*.json' {\n  const content: any;\n  export = content;\n}\n\ndeclare module '*.svg' {\n  const content: string;\n  export default content;\n}\n\ndeclare module '*.css' {\n  const content: string;\n  export default content;\n}\n\ndeclare var __REDOC_VERSION__: string;\ndeclare var __REDOC_REVISION__: string;\n\ndeclare var reactHotLoaderGlobal: any;\n\ninterface Element {\n  scrollIntoViewIfNeeded(centerIfNeeded?: boolean): void;\n}\n\ntype GenericObject = Record<string, any>;\n"
  },
  {
    "path": "cypress.config.ts",
    "content": "import { defineConfig } from 'cypress';\n\nexport default defineConfig({\n  fixturesFolder: false,\n  fileServerFolder: '.',\n  video: true,\n  projectId: 'z6eb6h',\n  viewportWidth: 1440,\n  viewportHeight: 720,\n  e2e: {\n    // We've imported your old cypress plugins here.\n    // You may want to clean this up later by importing these.\n    setupNodeEvents(on, config) {\n      return require('./e2e/plugins/index.js')(on, config);\n    },\n    excludeSpecPattern: '*.js.map',\n    specPattern: 'e2e/integration/**/*.{js,jsx,ts,tsx}',\n    supportFile: false,\n  },\n});\n"
  },
  {
    "path": "demo/ComboBox.tsx",
    "content": "/**\n * Could not find ready-to-use component with required behaviour so\n * I quickly hacked my own. Will refactor into separate npm package later\n */\n\nimport * as React from 'react';\nimport styled from '../src/styled-components';\n\nconst DropDownItem = styled.li<{ $active?: boolean }>`\n  ${(props: any) => (props.$active ? 'background-color: #eee' : '')};\n  padding: 13px 16px;\n  &:hover {\n    background-color: #eee;\n  }\n  cursor: pointer;\n  text-overflow: ellipsis;\n  overflow: hidden;\n`;\n\nconst DropDownList = styled.ul`\n  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12),\n    0 3px 1px -2px rgba(0, 0, 0, 0.2);\n  background: #fff;\n  border-radius: 0 0 2px 2px;\n  top: 100%;\n  left: 0;\n  right: 0;\n  z-index: 200;\n  overflow: hidden;\n  position: absolute;\n  list-style: none;\n  margin: 4px 0 0 0;\n  padding: 5px 0;\n  font-family: Roboto, sans-serif;\n  overflow: hidden;\n`;\n\nconst ComboBoxWrap = styled.div`\n  position: relative;\n  width: 100%;\n  max-width: 500px;\n  display: flex;\n`;\n\nconst Input = styled.input`\n  box-sizing: border-box;\n  width: 100%;\n  padding: 0 10px;\n  color: #555;\n  background-color: #fff;\n  border: 1px solid #ccc;\n\n  font-size: 16px;\n  height: 28px;\n  box-sizing: border-box;\n  vertical-align: middle;\n  line-height: 1;\n  outline: none;\n\n  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n  transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;\n\n  &:focus {\n    border-color: #66afe9;\n    outline: 0;\n    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\n  }\n`;\n\nconst Button = styled.button`\n  background-color: #fff;\n  color: #333;\n  padding: 2px 10px;\n  touch-action: manipulation;\n  cursor: pointer;\n  user-select: none;\n  border: 1px solid #ccc;\n  border-left: 0;\n  font-size: 16px;\n  height: 28px;\n  box-sizing: border-box;\n  vertical-align: middle;\n  line-height: 1;\n  outline: none;\n  width: 80px;\n\n  white-space: nowrap;\n\n  @media screen and (max-width: 450px) {\n    display: none;\n  }\n`;\n\nexport interface ComboBoxProps {\n  onChange?: (val: string) => void;\n  options: Array<{ value: string; label: string }>;\n  placeholder?: string;\n  value?: string;\n}\nexport interface ComboBoxState {\n  open: boolean;\n  value: string;\n  activeItemIdx: number;\n}\n\nexport default class ComboBox extends React.Component<ComboBoxProps, ComboBoxState> {\n  state = {\n    open: false,\n    value: this.props.value || '',\n    activeItemIdx: -1,\n  };\n\n  open = () => {\n    this.setState({\n      open: true,\n    });\n  };\n\n  close = () => {\n    this.setState({\n      open: false,\n      activeItemIdx: -1,\n    });\n  };\n\n  handleChange = e => {\n    this.updateValue(e.currentTarget.value);\n  };\n\n  updateValue(value) {\n    this.setState({\n      value,\n      activeItemIdx: -1,\n    });\n  }\n\n  handleSelect(value: string) {\n    this.updateValue(value);\n    if (this.props.onChange) {\n      this.props.onChange(value);\n    }\n    this.close();\n  }\n\n  handleTryItClick = () => {\n    this.handleSelect(this.state.value);\n  };\n\n  handleKeyPress = (e: React.KeyboardEvent<HTMLInputElement>) => {\n    if (e.keyCode === 13) {\n      this.handleSelect(e.currentTarget.value);\n    } else if (e.keyCode === 40) {\n      const activeItemIdx = Math.min(this.props.options.length - 1, ++this.state.activeItemIdx);\n      this.setState({\n        open: true,\n        activeItemIdx,\n        value: this.props.options[activeItemIdx].value,\n      });\n      e.preventDefault();\n    } else if (e.keyCode === 38) {\n      const activeItemIdx = Math.max(0, --this.state.activeItemIdx);\n      this.setState({\n        activeItemIdx,\n        value: this.props.options[activeItemIdx].value,\n      });\n      e.preventDefault();\n    } else if (e.keyCode === 27) {\n      this.close();\n    }\n  };\n\n  handleBlur = () => {\n    setTimeout(() => this.close(), 100);\n  };\n\n  handleItemClick = (val, idx) => {\n    this.handleSelect(val);\n    this.setState({\n      activeItemIdx: idx,\n    });\n  };\n\n  renderOption = (option: { value: string; label: string }, idx: number) => {\n    return (\n      <DropDownItem\n        $active={idx === this.state.activeItemIdx}\n        key={option.value}\n        // tslint:disable-next-line\n        onMouseDown={() => {\n          this.handleItemClick(option.value, idx);\n        }}\n      >\n        <small>\n          <strong>{option.label}</strong>\n        </small>\n        <br />\n        {option.value}\n      </DropDownItem>\n    );\n  };\n\n  render() {\n    const { open, value } = this.state;\n    const { options, placeholder } = this.props;\n    return (\n      <ComboBoxWrap>\n        <Input\n          placeholder={placeholder}\n          onChange={this.handleChange}\n          value={value}\n          onFocus={this.open}\n          onBlur={this.handleBlur}\n          onKeyDown={this.handleKeyPress}\n          aria-label=\"URL to an OpenAPI definition to try\"\n        />\n        <Button onClick={this.handleTryItClick}> TRY IT </Button>\n        {open && <DropDownList>{options.map(this.renderOption)}</DropDownList>}\n      </ComboBoxWrap>\n    );\n  }\n}\n"
  },
  {
    "path": "demo/big-openapi.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"servers\": [\n    {\n      \"url\": \"//api.rebilly.com/v2.1\",\n      \"description\": \"Live Server\"\n    },\n    {\n      \"url\": \"//api-sandbox.rebilly.com/v2.1\",\n      \"description\": \"Sandbox Server\"\n    }\n  ],\n  \"info\": {\n    \"version\": \"2.1\",\n    \"title\": \"Rebilly REST API\",\n    \"contact\": {\n      \"name\": \"Rebilly API Support\",\n      \"url\": \"https://www.rebilly.com/contact/\",\n      \"email\": \"integrations@rebilly.com\"\n    },\n    \"license\": {\n      \"name\": \"Rebilly\",\n      \"url\": \"https://my.rebilly.com/api/license/\"\n    },\n    \"termsOfService\": \"https://www.rebilly.com/terms/\",\n    \"x-logo\": {\n      \"url\": \"https://rebilly.github.io/RebillyAPI/rb_apiLogo.svg\",\n      \"backgroundColor\": \"#0033A0\",\n      \"altText\": \"Rebilly API logo\"\n    },\n    \"description\": \"# Introduction\\nThe Rebilly API is built on HTTP.  Our API is RESTful.  It has predictable\\nresource URLs.  It returns HTTP response codes to indicate errors.  It also\\naccepts and returns JSON in the HTTP body.  You can use your favorite\\nHTTP/REST library for your programming language to use Rebilly's API, or\\nyou can use one of our SDKs (currently available in [PHP](https://github.com/Rebilly/rebilly-php)\\nand [C#](https://github.com/Rebilly/rebilly-dotnet-client)).\\n\\n# Authentication\\nWhen you sign up for an account, you are given your first API key.\\nYou can generate additional API keys, and delete API keys (as you may\\nneed to rotate your keys in the future). You authenticate to the\\nRebilly API by providing your secret key in the request header.\\n\\nRebilly offers three forms of authentication:  private key, JSON Web Tokens, and\\npublic key.\\n- private key: authenticates each request by searching for the presence\\nof an HTTP header: REB-APIKEY.\\n- JWT: authenticates each request by the HTTP header: Authorization.\\n- public key: authenticates by the HTTP header: REB-AUTH (read more on this below).\\n\\nRebilly also offers JSON Web Tokens (JWT) authentication, where you can control\\nthe specific granular permissions and expiration for that JWT.  We call our resource\\nfor generating JWT [Sessions](#tag/Sessions).\\n\\nRebilly also has a client-side authentication scheme that uses an\\napiUser and HMAC-SHA1 signature (only for the Tokens resource), so\\nthat you may safely create tokens from the client-side without compromising\\nyour secret keys.\\n\\nNever share your secret keys. Keep them guarded and secure.\\nThe client-side authentication scheme uses one HTTP header named REB-AUTH.\\n\\n\\n\\n# PHP SDK\\nFor all PHP SDK examples provided in this spec you will need to configure `$client`.\\nYou may do it like this:\\n\\n```php\\n$client = new Rebilly\\\\Client([\\n    'apiKey' => 'YourApiKeyHere',\\n    'baseUrl' => 'https://api.rebilly.com',\\n]);\\n```\\n\"\n  },\n  \"tags\": [\n    {\n      \"name\": \"3D Secure\",\n      \"description\": \"3D Secure is a way to authenticate and protect transactions.  Typically,\\nit's only possible to protect the initial transaction in a subscription\\nwith 3D Secure.\\n\"\n    },\n    {\n      \"name\": \"API Keys\",\n      \"description\": \"Always keep your API Keys private.  In addition to your API Keys, you may use\\nJSON Web Tokens (JWT) to authenticate to the API.  See\\nour [Sessions](#tag/Sessions) resource for more information.\\n\"\n    },\n    {\n      \"name\": \"Bank Accounts\",\n      \"description\": \"Bank Accounts are a type of payment instrument used to collect\\nACH (echeck) payments, similar to how a payment\\ncard would be used to for a credit card payment.\\n\"\n    },\n    {\n      \"name\": \"Blacklists\",\n      \"description\": \"Your blacklists contains values of customerIds, email addresses,\\nipAddresses, bank identification numbers, countries or payment cards that\\nyou do NOT want to do business with. They are a good tool for managing\\nrisk. A blacklist entry that expires after a period of time we call a\\ngreylist.\\n\"\n    },\n    {\n      \"name\": \"Checkout Pages\",\n      \"description\": \"Hosted checkout pages.\\n\"\n    },\n    {\n      \"name\": \"Contacts\",\n      \"description\": \"Contacts are Customer's address book.\\nAll contact information used in Invoices, Subscriptions, Transacions, etc is enlisted here. However, changing a Contact won't change corresponding contact information in related resources\\n\"\n    },\n    {\n      \"name\": \"Coupons\",\n      \"description\": \"Coupons allows to apply different types of discounts to Invoices, Subscriptions and Plans. Redeemed Coupons will be applied only to Invoices with the same currency.\\n\"\n    },\n    {\n      \"name\": \"Customers\",\n      \"description\": \"Customers are your customers, sometimes known as accounts, clients,\\nmembers, patrons, or players in other systems.\\n\"\n    },\n    {\n      \"name\": \"Customer Authentication\",\n      \"description\": \"Create authentication credentials, login, logout, and verify your customers.\\n\"\n    },\n    {\n      \"name\": \"Custom Events\",\n      \"description\": \"If system events can't solve your problems, you are able to create a custom event\\nthat can fit your requirements, and use it to solve your own business logic.\\n\"\n    },\n    {\n      \"name\": \"Custom Rules\",\n      \"description\": \"\\\"Don't conform to the rules. Create the rules.\\\"\\nRather than adapt your workflow and business, Rebilly can align with your business\\nobjectives by giving you the power to automate certain behaviors when key events happen.\\nYou can use this to your advantage to mitigate risk, maximize conversions and minimize costs.\\nYou have the controls at your fingertips here. If you need more control,\\nor help dialing in on a strategy, feel free to contact us.\\n\\nWhen an event happens, it triggers the evaluation of conditions (that you set up),\\nin order from top to bottom. If the condition is met, the corresponding actions are executed.\\nThe conditions continue to be checked until either all of the conditions have been executed,\\nor a special \\\"stop\\\" action is executed.\\n\"\n    },\n    {\n      \"name\": \"Custom Fields\",\n      \"description\": \"Create additional custom fields for particular resources.  You may name,\\ndescribe, and determine the type of the schema.\\n\"\n    },\n    {\n      \"name\": \"Credential Hashes\",\n      \"description\": \"Get and create SMTP and Webhook credential hashes.\\n\"\n    },\n    {\n      \"name\": \"Disputes\",\n      \"description\": \"Handle disputes (chargebacks and retrievals).\\n\"\n    },\n    {\n      \"name\": \"Email Credentials\",\n      \"description\": \"Send automated emails through our system by connecting to your third party\\nSMTP server (or your third party email service provider's SMTP server).\\n\"\n    },\n    {\n      \"name\": \"Files\",\n      \"description\": \"A File is an entity that can store a physical file and some metadata. It also provides an easy access to\\nits size, mime-type, user-defined tags and description thus allowing easy sorting and searching among stored\\nfiles.\\nThere are several methods of file uploading available: multipart/form-data encoded form, RAW POST (by sending\\nfile contents as POST body), fetching from URL (by providing the file URL via 'url' param)\\nAttachment is an entity that is used to link a File to one or multiple objects like Customer, Dispute, Payment,\\nTransaction, Subscription, Plan, Product, Invoice, Note. That allows to quickly find and use files related to\\nthose specific entities.\\n\"\n    },\n    {\n      \"name\": \"Gateway Accounts\",\n      \"description\": \"Gateway accounts connect payment request to third party networks and platforms.\\n\"\n    },\n    {\n      \"name\": \"Invoices\",\n      \"description\": \"Invoices leave a record for both you and your customer of the products sold.\\n\"\n    },\n    {\n      \"name\": \"Layouts\",\n      \"description\": \"Layouts are used to hold collections of plans. A layout can be used to\\npower a pricing page. You can make multiple layouts, and use rules to\\ntarget them to different audiences.\\n\"\n    },\n    {\n      \"name\": \"Lists\",\n      \"description\": \"Lists contain sets of values and may be referenced within Rules criteria.\\n\\nYou may grant permissions to edit Lists to different people than those who can edit Rules.\\nIt may be useful if your workflow involves frequent updates to value sets used in criteria.\\n\"\n    },\n    {\n      \"name\": \"Migrate payment cards\",\n      \"description\": \"Migrate payment cards from one gateway to another.\\n\"\n    },\n    {\n      \"name\": \"Notes\",\n      \"description\": \"Leave notes on a customer record to have a handy location to share with\\nothers who may interface with the customer.  It's great for customer service.\\n\"\n    },\n    {\n      \"name\": \"Organizations\",\n      \"description\": \"Organizations include the name and address of the entities related to your\\naccount. An account may be multi-national, and support multiple\\norganizations. Note: Organizations are share between \\\"Live\\\" and \\\"Sandbox\\\"\\n\"\n    },\n    {\n      \"name\": \"Payments\",\n      \"description\": \"Collect money from your customers with payments.  You can schedule a payment\\nto occur in the future.  You can assign a dunning schedule to a payment to collect\\nin the case of a decline.\\n\\nSome payments may be, what we term, suspended payments.  These types of payments\\nrequire user interaction.  For example, an initial PayPal purchase, a 3D Secure\\npurchase, China Union Pay, and more require the customer's interaction to\\ncomplete the payment.  We call these a \\\"suspended\\\" payment flow.\\n\"\n    },\n    {\n      \"name\": \"Payment Cards\",\n      \"description\": \"Payment cards are a type of payment instrument used for credit and debit card\\nsales.  Rebilly securely vaults the full payment card number, and can pass it\\nonward securely to any gateway account to transact business.\\n\"\n    },\n    {\n      \"name\": \"Payment Tokens\",\n      \"description\": \"Payment tokens are used to reduce the scope of PCI DSS compliance.  A payment\\ntoken can be made using a different authentication scheme (refer to the public key\\nauthentication scheme in the Authentication section), which allows you to\\ncreate a payment token directly from the browser, bypassing the need to send\\nsensitive cardholder info to your servers.  We recommend using this with our\\nRebilly.js library, which helps you wire a form into this API resource and create\\npayment tokens.\\n\"\n    },\n    {\n      \"name\": \"Plans\",\n      \"description\": \"Plans are a template for making a subscription.  For example, you may have a plan\\nthat has a 30-day free trial followed by a recurring charge of $19.95 per month\\nuntil canceled.  The combination of the plan and a request to make a subscription\\nwill apply those instructions to create the invoices according to the plan's\\nschedule.\\n\"\n    },\n    {\n      \"name\": \"Products\",\n      \"description\": \"Proposed:  Your product includes digital goods, services, and physical goods.\\n\"\n    },\n    {\n      \"name\": \"Reports\",\n      \"description\": \"The Rebilly Reporting API is currently experimental.  You may see\\nthe [Reports API Documentation here](https://rebilly.github.io/RebillyReportsAPI/).\\n\"\n    },\n    {\n      \"name\": \"Rules\",\n      \"description\": \"\\\"Don't conform to the rules. Create the rules.\\\"\\nRather than adapt your workflow and business, Rebilly can align with your business\\nobjectives by giving you the power to automate certain behaviors when key events happen.\\nYou can use this to your advantage to mitigate risk, maximize conversions and minimize costs.\\nYou have the controls at your fingertips here. If you need more control,\\nor help dialing in on a strategy, feel free to contact us.\\n\\nWhen an event happens, it triggers the evaluation of conditions (that you set up),\\nin order from top to bottom. If the condition is met, the corresponding actions are executed.\\nThe conditions continue to be checked until either all of the conditions have been executed,\\nor a special \\\"stop\\\" action is executed.\\n\"\n    },\n    {\n      \"name\": \"Sessions\",\n      \"description\": \"A session contains a token, which is a JSON Web Token.  The token is created\\nwith a user's signin credentials.\\n\\nThis token can be used to authenticate to the API.  In addition, the session can be set to\\nexpire at a particular time, and has very granular control over permissions.\\nUse the token to then authenticate for further requests to the Rebilly API.\\n\\nThe token should be kept private, but could be stored on the user's browser\\nclient to simulate a \\\"session.\\\"\\n\"\n    },\n    {\n      \"name\": \"Shipping Zones\",\n      \"description\": \"A shipping zone contains regions and countries that you ship to. Each shipping zone has its own shipping rates.\\n\"\n    },\n    {\n      \"name\": \"Status\",\n      \"description\": \"Check the status of the Rebilly API (no authentication required).\\n\"\n    },\n    {\n      \"name\": \"Subscriptions\",\n      \"description\": \"A subscription applies a plan's template to create invoices for a customer at the\\nappropriate scheduled intervals.  A subscription may also determine if the payment\\nis collected automatically (with autopay set true).\\n\"\n    },\n    {\n      \"name\": \"Taxes\",\n      \"description\": \"Proposed: You can map a product to a tax category.  The tax category is used by\\ntax providers to calculate taxes for invoices.\\n\"\n    },\n    {\n      \"name\": \"Tracking\",\n      \"description\": \"Tracking is a layer for accessing all the activity (API requests,\\nsubscriptions, webhooks, events, etc.), thus providing easier\\ndebugging and issues auditing.\\n\"\n    },\n    {\n      \"name\": \"Transactions\",\n      \"description\": \"Get and refund transactions.\\n\"\n    },\n    {\n      \"name\": \"Users\",\n      \"description\": \"A User represents a person who can login to Rebilly, and take actions subject to\\ntheir granted permissions.\\n\"\n    },\n    {\n      \"name\": \"Websites\",\n      \"description\": \"A Website represents the website/brand that customers interact with... You\\ncould think of it like a brand.  For example, Nestle owns Perrier and Purina\\nand PowerBar.\\n\\nWe recognize that some enterprises have more than one website (or brand).  The\\nwebsite is related to each invoice and each payment gateway account.  This feature\\nwould allow you to have gateway accounts that are related to multiple websites, or\\nexclusive to particular websites.  And gives you more control over your business.\\n\"\n    },\n    {\n      \"name\": \"Webhooks\",\n      \"description\": \"Webhooks are designed to notify your systems when certain/all registered events happen in near real-time.\\nThey allow you to collect information about those events. Rebilly can send these information via\\nPOST to an URL of your choice.\\n\"\n    }\n  ],\n  \"security\": [\n    {\n      \"ApiKey\": []\n    }\n  ],\n  \"paths\": {\n    \"/3dsecure\": {\n      \"get\": {\n        \"tags\": [\n          \"3D Secure\"\n        ],\n        \"summary\": \"Retrieve a list of ThreeDSecure entries\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ThreeDSecure\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"3D Secure\"\n        ],\n        \"summary\": \"Create a ThreeDSecure entry\",\n        \"description\": \"Create a ThreeDSecure entry\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"ThreeDSecure entry was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ThreeDSecure\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ThreeDSecure\"\n              }\n            }\n          },\n          \"description\": \"ThreeDSecure resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/3dsecure/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"3D Secure\"\n        ],\n        \"summary\": \"Retrieve a ThreeDSecure entry\",\n        \"description\": \"Retrieve a ThreeDSecure entry with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ThreeDSecure entry was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ThreeDSecure\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/activation/{token}\": {\n      \"parameters\": [\n        {\n          \"name\": \"token\",\n          \"in\": \"path\",\n          \"description\": \"The token string\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\"\n          }\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Sends a token to activate user account\",\n        \"description\": \"Sends a token to activate user account\\n\",\n        \"security\": [\n          {\n            \"RebAuth\": []\n          }\n        ],\n        \"responses\": {\n          \"204\": {\n            \"description\": \"User account was activated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"422\": {\n            \"description\": \"Invalid token was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"try {\\n    $client->users()->activate('token');\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ]\n      }\n    },\n    \"/api-keys\": {\n      \"get\": {\n        \"tags\": [\n          \"API Keys\"\n        ],\n        \"summary\": \"Retrieve a list of api keys\",\n        \"description\": \"Retrieve a list of api keys\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of api keys was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ApiKey\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$apiKeys = $client->apiKeys()->search([\\n    'filter' => 'description:Test',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"API Keys\"\n        ],\n        \"summary\": \"Create an api key\",\n        \"description\": \"Create an api key\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Api Key was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ApiKey\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$apiKeyForm = new Rebilly\\\\Entities\\\\ApiKey();\\n$apiKeyForm->setDescription('Test');\\n$apiKeyForm->setDatetimeFormat($apiKeyForm::DATETIME_FORMAT_MYSQL);\\n\\ntry {\\n    $apiKey = $client->apiKeys()->create($apiKeyForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/ApiKey\"\n        }\n      }\n    },\n    \"/api-keys/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"API Keys\"\n        ],\n        \"summary\": \"Retrieve api key\",\n        \"description\": \"Retrieve api key with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Api key was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ApiKey\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$apiKeys = $client->apiKeys()->load('apiKeyID');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"API Keys\"\n        ],\n        \"summary\": \"Create or update api key with predefined ID\",\n        \"description\": \"Create or update api key with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ApiKey was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ApiKey\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"ApiKey was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ApiKey\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$apiKeyForm = new Rebilly\\\\Entities\\\\ApiKey();\\n$apiKeyForm->setDescription('TestPut');\\n$apiKeyForm->setDatetimeFormat($apiKeyForm::DATETIME_FORMAT_MYSQL);\\n\\ntry {\\n    $apiKey = $client->apiKeys()->update('apiKeyID', $apiKeyForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/ApiKey\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"API Keys\"\n        ],\n        \"summary\": \"Delete api key\",\n        \"description\": \"Delete api key with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"ApiKey was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"$ref\": \"#/components/responses/Conflict\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->apiKeys()->delete('apiKeyID');\\n\"\n          }\n        ]\n      }\n    },\n    \"/attachments\": {\n      \"get\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Retrieve a list of Attachments\",\n        \"description\": \"Retrieve a list of Attachments\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionQuery\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"name\": \"sort\",\n            \"in\": \"query\",\n            \"description\": \"The collection items sort field and order (prefix with \\\"-\\\" for descending sort).\",\n            \"style\": \"form\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\",\n                \"enum\": [\n                  \"id\",\n                  \"-id\",\n                  \"name\",\n                  \"-name\",\n                  \"relatedId\",\n                  \"-relatedId\",\n                  \"relatedType\",\n                  \"-relatedType\",\n                  \"fileId\",\n                  \"-fileId\",\n                  \"createdTime\",\n                  \"-createdTime\",\n                  \"updatedTime\",\n                  \"-updatedTime\"\n                ]\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Attachments was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Attachment\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$attachments = $client->attachments()->search([\\n    'filter' => 'relatedType:customer',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Create an Attachment\",\n        \"description\": \"Create an Attachment\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Attachment was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Attachment\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$attachmentForm = new Rebilly\\\\Entities\\\\Attachment();\\n$attachmentForm->setFileId('fileId');\\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\\n$attachmentForm->setRelatedId('customerId');\\n\\ntry {\\n    $attachment = $client->attachments()->create($attachmentForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Attachment\"\n        }\n      }\n    },\n    \"/attachments/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Retrieve an Attachment\",\n        \"description\": \"Retrieve a Attachment with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Attachment was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Attachment\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$attachment = $client->attachments()->load('attachmentId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Update the Attachment with predefined ID\",\n        \"description\": \"Update the Attachment with predefined ID\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Attachment was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Attachment\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Attachment was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Attachment\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$attachmentForm = new Rebilly\\\\Entities\\\\Attachment();\\n$attachmentForm->setFileId('fileId');\\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\\n$attachmentForm->setRelatedId('customerId');\\n\\ntry {\\n    $attachment = $client->attachments()->update('attachmentId', $attachmentForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Attachment\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Delete an Attachment\",\n        \"description\": \"Delete the Attachment with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Attachment was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->attachments()->delete('attachmentId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/authentication-options\": {\n      \"get\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Read current authentication options\",\n        \"description\": \"Read current authentication options\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Current authentication options was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/AuthenticationOptions\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$authenticationOptions = $client->authenticationOptions()->load();\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Change authentication options\",\n        \"description\": \"Change options\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Authentication Options were updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/AuthenticationOptions\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$authenticationOptionsForm = new Rebilly\\\\Entities\\\\AuthenticationOptions();\\n// Regular expression below matches any password with 6+ length that contains alphabet symbols and/or numbers.\\n$authenticationOptionsForm->setPasswordPattern('/^[a-zA-Z0-9]{6,}$/');\\n\\ntry {\\n    $authenticationOptions = $client->authenticationOptions()->update($authenticationOptionsForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/AuthenticationOptions\"\n              }\n            }\n          },\n          \"description\": \"Authentication Options resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/authentication-tokens\": {\n      \"get\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Retrieve a list of auth tokens\",\n        \"description\": \"Retrieve a list of auth tokens\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of auth tokens was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/AuthenticationToken\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$authenticationTokens = $client->authenticationTokens()->search([\\n    'filter' => 'customerId:testCustomer',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Login\",\n        \"description\": \"Login a user (customer)\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Login successful\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/AuthenticationToken\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$authenticationForm = new Rebilly\\\\Entities\\\\AuthenticationToken();\\n$authenticationForm->setUsername('username');\\n$authenticationForm->setPassword('test123');\\n\\ntry {\\n    $authenticationToken = $client->authenticationTokens()->login($authenticationForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/AuthenticationToken\"\n              }\n            }\n          },\n          \"description\": \"AuthenticationToken resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/authentication-tokens/{token}\": {\n      \"parameters\": [\n        {\n          \"name\": \"token\",\n          \"in\": \"path\",\n          \"description\": \"The token identifier string\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\"\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Verify\",\n        \"description\": \"Verify an authentication token\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Authentication Token was verified\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/AuthenticationToken\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$isVerified = $client->authenticationTokens()->verify('token');\\n\"\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Logout a user\",\n        \"description\": \"Logout a user\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"User was logged out\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->authenticationTokens()->logout('token');\\n\"\n          }\n        ]\n      }\n    },\n    \"/bank-accounts\": {\n      \"get\": {\n        \"tags\": [\n          \"Bank Accounts\"\n        ],\n        \"summary\": \"Retrieve a list of bank accounts\",\n        \"description\": \"Retrieve a list of Bank Accounts\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Bank Accounts was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/BankAccount\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$bankAccounts = $client->bankAccounts()->search([\\n    'filter' => 'customerId:testId',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Bank Accounts\"\n        ],\n        \"summary\": \"Create a Bank Account\",\n        \"description\": \"Create a Bank Account\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Bank Account was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BankAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$bankAccountForm = new Rebilly\\\\Entities\\\\BankAccount();\\n$bankAccountForm->setCustomerId('customerId');\\n$bankAccountForm->setContactId('contactId');\\n$bankAccountForm->setRoutingNumber('0123456');\\n$bankAccountForm->setAccountNumber('0123456');\\n$bankAccountForm->setAccountType('checking');\\n\\ntry {\\n    $bankAccount = $client->bankAccounts()->create($bankAccountForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/BankAccount\"\n        }\n      }\n    },\n    \"/bank-accounts/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Bank Accounts\"\n        ],\n        \"summary\": \"Retrieve a Bank Account\",\n        \"description\": \"Retrieve a Bank Account with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"BankAccount was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BankAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$bankAccount = $client->bankAccounts()->load('bankAccountId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Bank Accounts\"\n        ],\n        \"summary\": \"Create a BankAccount with predefined ID\",\n        \"description\": \"Create or update a BankAccount with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"BankAccount was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BankAccount\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"BankAccount was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BankAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$bankAccountForm = new Rebilly\\\\Entities\\\\BankAccount();\\n$bankAccountForm->setCustomerId('customerId');\\n$bankAccountForm->setContactId('contactId');\\n$bankAccountForm->setRoutingNumber('0123456');\\n$bankAccountForm->setAccountNumber('0123456');\\n$bankAccountForm->setAccountType('checking');\\n\\ntry {\\n    $bankAccount = $client->customers()->create($bankAccountForm, 'bankAccountId');\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/BankAccount\"\n        }\n      }\n    },\n    \"/bank-accounts/{id}/deactivation\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Bank Accounts\"\n        ],\n        \"summary\": \"Deactivate a Bank Account\",\n        \"description\": \"Deactivate a Bank Account\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Deactivated successful\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/BankAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$bankAccount = $client->bankAccounts()->deactivate('bankAccountId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/blacklists\": {\n      \"get\": {\n        \"tags\": [\n          \"Blacklists\"\n        ],\n        \"summary\": \"Retrieve a list of blacklists\",\n        \"description\": \"Retrieve a list of blacklists\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Blacklists was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Blacklist\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$blacklists = $client->blacklists()->search([\\n    'filter' => 'value:testValue',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Blacklists\"\n        ],\n        \"summary\": \"Create a blacklist\",\n        \"description\": \"Create a blacklist\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Blacklist was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Blacklist\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$blacklistForm = new Rebilly\\\\Entities\\\\Blacklist();\\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\\n$blacklistForm->setValue('test@test.com');\\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\\n\\ntry {\\n    $blacklist = $client->blacklists()->create($blacklistForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Blacklist\"\n        }\n      }\n    },\n    \"/blacklists/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Blacklists\"\n        ],\n        \"summary\": \"Retrieve a blacklist\",\n        \"description\": \"Retrieve a blacklist with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Blacklist was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Blacklist\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$blacklist = $client->blacklists()->load('blacklistId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Blacklists\"\n        ],\n        \"summary\": \"Create a blacklist with predefined ID\",\n        \"description\": \"Create a blacklist with predefined identifier string\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Blacklist was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Blacklist\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"409\": {\n            \"description\": \"Blacklist exist and cannot be updated\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$blacklistForm = new Rebilly\\\\Entities\\\\Blacklist();\\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\\n$blacklistForm->setValue('test@test.com');\\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\\n\\ntry {\\n    $blacklist = $client->blacklists()->create($blacklistForm, 'blacklistId');\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Blacklist\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Blacklists\"\n        ],\n        \"summary\": \"Delete a blacklist\",\n        \"description\": \"Delete a blacklist with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"description\": \"Blacklist was deleted\"\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->blacklists()->delete('blacklistId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/checkout-pages\": {\n      \"get\": {\n        \"tags\": [\n          \"Checkout Pages\"\n        ],\n        \"summary\": \"Retrieve a list of checkout pages\",\n        \"description\": \"Retrieve a list of checkout pages\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of checkout pages was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/CheckoutPage\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$checkoutPages = $client->checkoutPages()->search([\\n    'filter' => 'name:testCheckoutPage',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Checkout Pages\"\n        ],\n        \"summary\": \"Create a Checkout Page\",\n        \"description\": \"Create a Checkout Page\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Checkout Page was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CheckoutPage\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$checkoutPageForm = new Rebilly\\\\Entities\\\\CheckoutPage();\\n$checkoutPageForm->setPlanId('planId');\\n$checkoutPageForm->setWebsiteId('websiteId');\\n$checkoutPageForm->setName('TestCheckoutPage');\\n$checkoutPageForm->setUriPath('test-checkout-page');\\n\\ntry {\\n    $checkoutPage = $client->checkoutPages()->create($checkoutPageForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/CheckoutPage\"\n        }\n      }\n    },\n    \"/checkout-pages/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Checkout Pages\"\n        ],\n        \"summary\": \"Retrieve a Checkout Page\",\n        \"description\": \"Retrieve a Checkout Page with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Checkout Page was retrieved successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CheckoutPage\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$checkoutPage = $client->checkoutPages()->load('checkoutPageId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Checkout Pages\"\n        ],\n        \"summary\": \"Create or update a Checkout Page with predefined ID\",\n        \"description\": \"Create or update a Checkout Page with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Checkout Page was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CheckoutPage\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Checkout Page was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CheckoutPage\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$checkoutPageForm = new Rebilly\\\\Entities\\\\CheckoutPage();\\n$checkoutPageForm->setPlanId('planId');\\n$checkoutPageForm->setWebsiteId('websiteId');\\n$checkoutPageForm->setName('TestCheckoutPage');\\n$checkoutPageForm->setUriPath('test-checkout-page');\\n\\ntry {\\n    $checkoutPage = $client->checkoutPages()->update('checkoutPageId', $checkoutPageForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/CheckoutPage\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Checkout Pages\"\n        ],\n        \"summary\": \"Delete a Checkout Page\",\n        \"description\": \"Delete a Checkout Page with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"description\": \"Checkout Page was deleted\"\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Checkout page cannot be deleted\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->checkoutPages()->delete('checkoutPageId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/contacts\": {\n      \"get\": {\n        \"tags\": [\n          \"Contacts\"\n        ],\n        \"summary\": \"Retrieve a list of contacts\",\n        \"description\": \"Retrieve a list of contacts\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Contacts was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Contact\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$contacts = $client->contacts()->search([\\n    'filter' => 'firstName:John',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Contacts\"\n        ],\n        \"summary\": \"Create a contact\",\n        \"description\": \"Create a contact\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Contact was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Contact\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$contactForm = new Rebilly\\\\Entities\\\\Contact();\\n$contactForm->setFirstName('Sherlock');\\n$contactForm->setLastName('Holmes');\\n$contactForm->setOrganization('TestOrganization');\\n\\ntry {\\n    $contact = $client->contacts()->create($contactForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Contact\"\n        }\n      }\n    },\n    \"/contacts/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Contacts\"\n        ],\n        \"summary\": \"Retrieve a contact\",\n        \"description\": \"Retrieve a contact with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Contact was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Contact\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$contact = $client->contacts()->load('contactId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Contacts\"\n        ],\n        \"summary\": \"Create or update a contact with predefined ID\",\n        \"description\": \"Create or update a contact with predefined identifier string\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Contact was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Contact\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Contact exists and cannot be updated\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$contactForm = new Rebilly\\\\Entities\\\\Contact();\\n$contactForm->setFirstName('Sherlock');\\n$contactForm->setLastName('Holmes');\\n$contactForm->setOrganization('TestOrganization');\\n\\ntry {\\n    $contact = $client->contacts()->update('contactId', $contactForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Contact\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Contacts\"\n        ],\n        \"summary\": \"Delete a contact\",\n        \"description\": \"Delete a contact with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Contact was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"402\": {\n            \"description\": \"Contact cannot be deleted\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/coupons-redemptions\": {\n      \"get\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Retrieve a list of coupon redemptions\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionQuery\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionCriteria\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionSort\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Coupons redemptions were retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/CouponRedemption\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$couponRedemptions = $client->couponsRedemptions()->search([\\n    'filter' => 'customerId:testCustomer',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Redeem a coupon\",\n        \"description\": \"Redeem a coupon\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Coupon was redeemed\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CouponRedemption\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$redemptionForm = new Rebilly\\\\Entities\\\\Coupons\\\\Redemption();\\n$redemptionForm->setCustomerId('customerId');\\n$redemptionForm->setRedemptionCode('redemptionCode');\\n\\n$restrictionArray = [\\n    'type' => Rebilly\\\\Entities\\\\Coupons\\\\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,\\n    'quantity' => 2,\\n];\\n\\n$restrictionForm = new Rebilly\\\\Entities\\\\Coupons\\\\Restriction([\\n    $restrictionArray,\\n]);\\n\\n$redemptionForm->setAdditionalRestrictions($restrictionForm);\\n\\ntry {\\n    $couponRedemption = $client->couponsRedemptions()->redeem($redemptionForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CouponRedemption\"\n              }\n            }\n          },\n          \"description\": \"Redeem a coupon\",\n          \"required\": true\n        }\n      }\n    },\n    \"/coupons-redemptions/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Retrieve a coupon redemption with specified identifier string\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Retrieve a coupon redemption with specified identifier string\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CouponRedemption\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$couponRedemption = $client->couponsRedemptions()->load('redemptionCode');\\n\"\n          }\n        ]\n      }\n    },\n    \"/coupons-redemptions/{id}/cancel\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Cancel a coupon redemption\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Cancel a coupon redemption\"\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->couponsRedemptions()->cancel('id');\\n\"\n          }\n        ]\n      }\n    },\n    \"/coupons\": {\n      \"get\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Retrieve a list of coupons\",\n        \"description\": \"Retrieve a list of coupons\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionQuery\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionCriteria\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionSort\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of coupons was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Coupon\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$coupons = $client->coupons()->search([\\n    'filter' => 'status:issued',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Create a coupon\",\n        \"description\": \"Create a coupon\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Coupon was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Coupon\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$couponForm = new Rebilly\\\\Entities\\\\Coupons\\\\Coupon();\\n\\n$discountArray = [\\n    'currency' => 'USD',\\n    'amount' => 1.99,\\n];\\n\\n$discountForm = new \\\\Rebilly\\\\Entities\\\\Coupons\\\\Discounts\\\\Fixed($discountArray);\\n$couponForm->setDiscount($discountForm);\\n// Coupon can be used right now\\n$couponForm->setIssuedTime(date('Y-m-d H:i:s'));\\n\\n$restrictionArray = [\\n    'quantity' => 2,\\n];\\n\\n$restrictionForm = new Rebilly\\\\Entities\\\\Coupons\\\\Restrictions\\\\DiscountsPerRedemption($restrictionArray);\\n\\n$couponForm->setRestrictions([$restrictionForm]);\\n\\ntry {\\n    $coupon = $client->coupons()->create($couponForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Coupon\"\n        }\n      }\n    },\n    \"/coupons/{redemptionCode}\": {\n      \"parameters\": [\n        {\n          \"name\": \"redemptionCode\",\n          \"in\": \"path\",\n          \"description\": \"The Coupon's redemption code\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\"\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Retrieve a coupon\",\n        \"description\": \"Retrieve a coupon with specified redemption code string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Coupon was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Coupon\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$coupon = $client->coupons()->load('redemptionCode');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Create or update a coupon with predefined redemption code\",\n        \"description\": \"Create or update a coupon with predefined redemption code\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Coupon was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Coupon\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Coupon was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Coupon\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Coupon was redeemed already and cannot be changed\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$couponForm = new Rebilly\\\\Entities\\\\Coupons\\\\Coupon();\\n\\n$discountArray = [\\n    'type' => Rebilly\\\\Entities\\\\Coupons\\\\Discount::TYPE_FIXED,\\n    'currency' => 'USD',\\n    'amount' => 1.99,\\n];\\n\\n$discountForm = new Rebilly\\\\Entities\\\\Coupons\\\\Discount($discountArray);\\n$couponForm->setDiscount($discountForm);\\n\\n$restrictionArray = [\\n    'type' => Rebilly\\\\Entities\\\\Coupons\\\\Restriction::TYPE_DISCOUNTS_PER_REDEMPTION,\\n    'quantity' => 2,\\n];\\n\\n$restrictionForm = new Rebilly\\\\Entities\\\\Coupons\\\\Restriction([\\n    $restrictionArray,\\n]);\\n\\n$couponForm->setRestrictions($restrictionForm);\\n\\ntry {\\n    $coupon = $client->coupons()->create($couponForm, 'redemptionCode');\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Coupon\"\n        }\n      }\n    },\n    \"/coupons/{redemptionCode}/expiration\": {\n      \"parameters\": [\n        {\n          \"name\": \"redemptionCode\",\n          \"in\": \"path\",\n          \"description\": \"The Coupon's redemption code\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\"\n          }\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Coupons\"\n        ],\n        \"summary\": \"Set a coupon's expiration time.\",\n        \"description\": \"Set a coupon's expiry time with the specified redemption code.\\nThe expiredTime of a coupon must be greater than its issuedTime.\\nThis cannot be performed on expired coupons.\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Coupon expiration was successfully set\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Coupon\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"$ref\": \"#/components/responses/Conflict\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CouponExpiration\"\n              }\n            }\n          },\n          \"description\": \"Coupon resource\"\n        }\n      }\n    },\n    \"/credential-hashes/emails\": {\n      \"post\": {\n        \"tags\": [\n          \"Credential Hashes\"\n        ],\n        \"summary\": \"Create an email credential\",\n        \"description\": \"Create an email credential\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Email credential was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SmtpCredential\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SmtpCredential\"\n              }\n            }\n          },\n          \"description\": \"Email credential resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/credential-hashes/emails/{hash}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/hash\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Credential Hashes\"\n        ],\n        \"summary\": \"Retrieve an email credential\",\n        \"description\": \"Retrieve an email credential with specified token identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Email credential was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SmtpCredential\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/credential-hashes/webhooks\": {\n      \"post\": {\n        \"tags\": [\n          \"Credential Hashes\"\n        ],\n        \"summary\": \"Create a webhook credential\",\n        \"description\": \"Create a webhook credential\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Webhook credential was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/WebhookCredential\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/WebhookCredential\"\n              }\n            }\n          },\n          \"description\": \"Credential resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/credential-hashes/webhooks/{hash}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/hash\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Credential Hashes\"\n        ],\n        \"summary\": \"Retrieve a webhook credential\",\n        \"description\": \"Retrieve a webhook credential with specified token identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Webhook credential was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/WebhookCredential\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/credentials\": {\n      \"get\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Retrieve a list of credentials\",\n        \"description\": \"Retrieve a list of credentials\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Credentials was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Credential\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customerCredentials = $client->customerCredentials()->search([\\n    'filter' => 'customerId:testCustomer',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Create a credential\",\n        \"description\": \"Create a credential\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Credential was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Credential\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customerCredentialForm = new Rebilly\\\\Entities\\\\CustomerCredential();\\n$customerCredentialForm->setCustomerId('customerId');\\n$customerCredentialForm->setUsername('test');\\n$customerCredentialForm->setPassword('1234');\\n\\ntry {\\n    $customerCredential = $client->customerCredentials()->create($customerCredentialForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Credential\"\n        }\n      }\n    },\n    \"/credentials/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Retrieve a credential\",\n        \"description\": \"Retrieve a credential with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Credential was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Credential\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customerCredential = $client->customerCredentials()->load('credentialId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Create or update a credential with predefined ID\",\n        \"description\": \"Create or update a credential with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Credential was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Credential\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Credential was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Credential\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customerCredentialForm = new Rebilly\\\\Entities\\\\CustomerCredential();\\n$customerCredentialForm->setCustomerId('customerId');\\n$customerCredentialForm->setUsername('test');\\n$customerCredentialForm->setPassword('1234');\\n\\ntry {\\n    $customerCredential = $client->customerCredentials()->update('credentialId', $customerCredentialForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Credential\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Delete a credential\",\n        \"description\": \"Delete a credential with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"description\": \"Credential was deleted\"\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->customerCredentials()->delete('credentialId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/custom-events\": {\n      \"get\": {\n        \"tags\": [\n          \"Custom Events\"\n        ],\n        \"summary\": \"Retrieve a list of custom events\",\n        \"description\": \"Retrieve a list of custom events\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"name\": \"sort\",\n            \"in\": \"query\",\n            \"description\": \"The collection items sort field and order (prefix with \\\"-\\\" for descending sort).\",\n            \"style\": \"form\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\",\n                \"enum\": [\n                  \"createdTime\",\n                  \"-createdTime\",\n                  \"handledTime\",\n                  \"-handledTime\",\n                  \"scheduledTime\",\n                  \"-scheduledTime\"\n                ]\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of custom events was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/CustomEvent\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"Custom Events\"\n        ],\n        \"summary\": \"Create a custom event\",\n        \"description\": \"Create a custom event\\n\",\n        \"responses\": {\n          \"202\": {\n            \"description\": \"Custom event was accepted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CustomEvent\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/CustomEvent\"\n        }\n      }\n    },\n    \"/custom-events/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Custom Events\"\n        ],\n        \"summary\": \"Retrieve a custom event\",\n        \"description\": \"Retrieve a custom event with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Custom event was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CustomEvent\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Custom Events\"\n        ],\n        \"summary\": \"Create a custom event with predefined ID\",\n        \"description\": \"Create a custom event with predefined identifier string\\n\",\n        \"responses\": {\n          \"202\": {\n            \"description\": \"Custom event was accepted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CustomEvent\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"409\": {\n            \"$ref\": \"#/components/responses/Conflict\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/CustomEvent\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Custom Events\"\n        ],\n        \"summary\": \"Delete a custom event\",\n        \"description\": \"Delete a custom event with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"description\": \"Custom event was deleted\"\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"$ref\": \"#/components/responses/Conflict\"\n          }\n        }\n      }\n    },\n    \"/custom-events/{id}/rules\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Custom Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve a list of rules for custom event\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Rules were retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RuleSet\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Custom Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Update the rules for custom event\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Rules were updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RuleSet\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/RuleSet\"\n        }\n      }\n    },\n    \"/custom-events/{id}/rules/history\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Custom Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve the change history of the set of rules for a custom event\",\n        \"description\": \"Retrieve the change history of the set of rules for the selected custom event.\\nThe history is updated each time you change the rules.\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionQuery\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionSort\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"History was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/RuleSetHistoryItem\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/custom-events/{id}/rules/history/{version}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        },\n        {\n          \"$ref\": \"#/components/parameters/rulesVersion\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Custom Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve the record from the change history of the set of rules for a custom event\",\n        \"description\": \"Retrieve the record from the change history of the set of rules for the selected custom event.\\nA history record is created each time you change the rules.\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Rules version was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RuleSetHistoryItem\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/custom-events/{id}/rules/versions/{version}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        },\n        {\n          \"$ref\": \"#/components/parameters/rulesVersion\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Custom Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve the version of the set of rules for a custom event\",\n        \"description\": \"Retrieve the version of the selected set of rules for the selected custom event.\\nThe versions are created each time you change the rules.\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Rules version was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RuleSetVersion\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/custom-fields/{resource}\": {\n      \"parameters\": [\n        {\n          \"name\": \"resource\",\n          \"in\": \"path\",\n          \"description\": \"The resource type string\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"customers\",\n              \"payment-cards\",\n              \"subscriptions\",\n              \"transactions\",\n              \"websites\",\n              \"contacts\",\n              \"products\"\n            ]\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Custom Fields\"\n        ],\n        \"summary\": \"Retrieve Custom Fields\",\n        \"description\": \"Retrieve a schema of Custom Fields for the given resource type\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A schema of Custom Fields was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"description\": \"The list of custom fields\",\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/CustomField\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customFields = $client->customFields()->search([\\n    'filter' => 'type:boolean',\\n]);\\n\"\n          }\n        ]\n      }\n    },\n    \"/custom-fields/{resource}/{name}\": {\n      \"parameters\": [\n        {\n          \"name\": \"resource\",\n          \"in\": \"path\",\n          \"description\": \"The resource type string\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"customers\",\n              \"payment-cards\",\n              \"subscriptions\",\n              \"transactions\",\n              \"websites\",\n              \"contacts\",\n              \"products\"\n            ]\n          }\n        },\n        {\n          \"name\": \"name\",\n          \"in\": \"path\",\n          \"description\": \"The custom field's identifier string\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\"\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Custom Fields\"\n        ],\n        \"summary\": \"Retrieve a Custom Field\",\n        \"description\": \"Retrieve a schema of the given Custom Field for the given resource type\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A schema of the Custom Field was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CustomField\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customField = $client->customFields()->load('customers', 'customerId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Custom Fields\"\n        ],\n        \"summary\": \"Create or alter a Custom Field\",\n        \"description\": \"Create or alter a schema of the given Custom Field for the given resource type.\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"The Custom Field was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CustomField\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"The Custom Fields was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CustomField\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"409\": {\n            \"description\": \"The schema is in use: remove all the associated data in order to remove or alter the schema\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customFieldForm = new Rebilly\\\\Entities\\\\CustomField();\\n$customFieldForm->setType($customFieldForm::TYPE_BOOLEAN);\\n\\ntry {\\n    $customField = $client->customFields()->update('customers', 'testFieldName', $customFieldForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/CustomField\"\n              }\n            }\n          },\n          \"description\": \"Custom Fields schema of the given resource type\",\n          \"required\": true\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Custom Fields\"\n        ],\n        \"summary\": \"Delete a custom field\",\n        \"description\": \"Delete a custom field by its name\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Custom field has been deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"The field is in use: remove all the associated data first\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->customFields()->delete('customers', 'testFieldName');\\n\"\n          }\n        ]\n      }\n    },\n    \"/customers\": {\n      \"get\": {\n        \"tags\": [\n          \"Customers\"\n        ],\n        \"summary\": \"Retrieve a list of customers\",\n        \"description\": \"Retrieve a list of customers\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionQuery\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"name\": \"sort\",\n            \"in\": \"query\",\n            \"description\": \"The collection items sort field and order (prefix with \\\"-\\\" for descending sort).\",\n            \"style\": \"form\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\",\n                \"enum\": [\n                  \"id\",\n                  \"-id\",\n                  \"email\",\n                  \"-email\",\n                  \"createdTime\",\n                  \"-createdTime\",\n                  \"updatedTime\",\n                  \"-updatedTime\"\n                ]\n              }\n            }\n          },\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"description\": \"The response media type\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/json\",\n                \"text/csv\"\n              ],\n              \"default\": \"application/json\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Customers was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Customer\"\n                  }\n                }\n              },\n              \"text/csv\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Customer\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customers = $client->customers()->search([\\n    'filter' => 'firstName:John',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Customers\"\n        ],\n        \"summary\": \"Create a customer\",\n        \"description\": \"Create a customer\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Customer was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Customer\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customerForm = new Rebilly\\\\Entities\\\\Customer();\\n$customerForm->setFirstName('Sherlock');\\n$customerForm->setLastName('Holmes');\\n$customerForm->setEmail('sherlock.holmes@gmail.com');\\n\\ntry {\\n    $customer = $client->customers()->create($customerForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Customer\"\n        }\n      }\n    },\n    \"/customers/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Customers\"\n        ],\n        \"summary\": \"Retrieve a customer\",\n        \"description\": \"Retrieve a customer with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Customer was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Customer\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customers = $client->customers()->load('myCustomerId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Customers\"\n        ],\n        \"summary\": \"Create a customer with predefined ID\",\n        \"description\": \"Create a customer with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Customer was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Customer\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Customer was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Customer\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customerForm = new Rebilly\\\\Entities\\\\Customer();\\n$customerForm->setFirstName('Sherlock');\\n$customerForm->setLastName('Holmes');\\n$customerForm->setEmail('sherlock.holmes@gmail.com');\\n\\ntry {\\n    $customer = $client->customers()->update('myCustomerId', $customerForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Customer\"\n        }\n      }\n    },\n    \"/customers/{id}/lead-source\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Customers\"\n        ],\n        \"summary\": \"Retrieve a customer's Lead Source\",\n        \"description\": \"Retrieve a Lead Source of given customer\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lead Source was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customer = $client->customers()->load('myCustomerId');\\n$leadSource = $customer->getLeadSource();\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Customers\"\n        ],\n        \"summary\": \"Create a Lead Source for a customer\",\n        \"description\": \"Create a Lead Source for a customer\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lead Source was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Lead Source was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$leadSourceForm = new Rebilly\\\\Entities\\\\LeadSource();\\n$leadSourceForm->setSource('TestSource');\\n$leadSourceForm->setCampaign('TestCampaign');\\n\\ntry {\\n    $customer = $client->customers()->updateLeadSource('myCustomerId', $leadSourceForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/LeadSource\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Customers\"\n        ],\n        \"summary\": \"Delete a Lead Source for a customer\",\n        \"description\": \"Delete a Lead Source that belongs to a certain customer\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Lead Source was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Lead Source cannot be deleted\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$customer = $client->customers()->deleteLeadSource('myCustomerId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/disputes\": {\n      \"get\": {\n        \"tags\": [\n          \"Disputes\"\n        ],\n        \"summary\": \"Retrieve a list of disputes\",\n        \"description\": \"Retrieve a list of disputes\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of disputes was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Dispute\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$disputes = $client->disputes()->search([\\n    'filter' => 'transactionId:testId',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Disputes\"\n        ],\n        \"summary\": \"Create a dispute\",\n        \"description\": \"Create a dispute\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Dispute was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Dispute\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$disputeForm = new Rebilly\\\\Entities\\\\Dispute();\\n$disputeForm->setTransactionId('transactionId');\\n$disputeForm->setCurrency('USD');\\n$disputeForm->setAmount(10);\\n$disputeForm->setReasonCode(1000);\\n$disputeForm->setType($disputeForm::TYPE_1CB);\\n$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);\\n$disputeForm->setPostedTime('2025-01-01 05:00:00');\\n\\ntry {\\n    $dispute = $client->disputes()->create($disputeForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Dispute\"\n        }\n      }\n    },\n    \"/disputes/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Disputes\"\n        ],\n        \"summary\": \"Retrieve a dispute\",\n        \"description\": \"Retrieve a dispute with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Dispute was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Dispute\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$dispute = $client->disputes()->load('disputeId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Disputes\"\n        ],\n        \"summary\": \"Create or update a Dispute with predefined ID\",\n        \"description\": \"Create or update a Dispute with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Dispute was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Dispute\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Dispute was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Dispute\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$disputeForm = new Rebilly\\\\Entities\\\\Dispute();\\n$disputeForm->setTransactionId('transactionId');\\n$disputeForm->setCurrency('USD');\\n$disputeForm->setAmount(10);\\n$disputeForm->setReasonCode(1000);\\n$disputeForm->setType($disputeForm::TYPE_1CB);\\n$disputeForm->setStatus($disputeForm::STATUS_RESPONSE_NEEDED);\\n$disputeForm->setPostedTime('2025-01-01 05:00:00');\\n\\ntry {\\n    $dispute = $client->disputes()->update('disputeId', $dispute);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Dispute\"\n        }\n      }\n    },\n    \"/events\": {\n      \"get\": {\n        \"tags\": [\n          \"Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve a list of existing events\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of System Events was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/SystemEvent\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      }\n    },\n    \"/events/{eventType}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/systemEventType\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve the event information\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Rules were retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SystemEvent\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/events/{eventType}/rules\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/systemEventType\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve a list of rules for event\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Rules were retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RuleSet\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Update the rules for event\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Rules were updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RuleSet\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/RuleSet\"\n        }\n      }\n    },\n    \"/events/{eventType}/rules/history\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/systemEventType\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve the change history of the set of rules\",\n        \"description\": \"Retrieve the change history of the selected set of rules.\\nThe history is updated each time you change the rules.\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionQuery\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionSort\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"History was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/RuleSetHistoryItem\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/events/{eventType}/rules/history/{version}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/systemEventType\"\n        },\n        {\n          \"$ref\": \"#/components/parameters/rulesVersion\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve the record from the change history of the set of rules\",\n        \"description\": \"Retrieve the record from the change history of the selected set of rules.\\nA history record is created each time you change the rules.\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"History record was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RuleSetHistoryItem\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/events/{eventType}/rules/versions/{version}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/systemEventType\"\n        },\n        {\n          \"$ref\": \"#/components/parameters/rulesVersion\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Events\",\n          \"Rules\"\n        ],\n        \"summary\": \"Retrieve the version of the set of rules\",\n        \"description\": \"Retrieve the version of the selected set of rules.\\nThe versions are created each time you change the rules.\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Rules version was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/RuleSetVersion\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/files\": {\n      \"get\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Retrieve a list of files\",\n        \"description\": \"Retrieve a list of files\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionQuery\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionExpand\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFields\"\n          },\n          {\n            \"name\": \"sort\",\n            \"in\": \"query\",\n            \"description\": \"The collection items sort field and order (prefix with \\\"-\\\" for descending sort).\",\n            \"style\": \"form\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\",\n                \"enum\": [\n                  \"id\",\n                  \"-id\",\n                  \"name\",\n                  \"-name\",\n                  \"extension\",\n                  \"-extension\",\n                  \"size\",\n                  \"-size\",\n                  \"width\",\n                  \"-width\",\n                  \"height\",\n                  \"-height\",\n                  \"createdTime\",\n                  \"-createdTime\",\n                  \"updatedTime\",\n                  \"-updatedTime\"\n                ]\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Files was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/File\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$files = $client->files()->search([\\n    'filter' => 'name:TestFile',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Create a file\",\n        \"description\": \"Create a file\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"File was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/File\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$fileForm = new Rebilly\\\\Entities\\\\File();\\n$fileForm->setUrl('http://test.com/somefile.jpg');\\n\\ntry {\\n    $file = $client->files()->create($fileForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"url\": {\n                    \"description\": \"The file URL\",\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"description\": \"Additionally, a file can be sent with a multipart/form-data POST request or the file's raw body can be sent as a request body\",\n          \"required\": true\n        }\n      }\n    },\n    \"/files/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Retrieve a File\",\n        \"description\": \"Retrieve a File with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"File was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/File\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$file = $client->files()->load('fileId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Update the File with predefined ID. Note that file can be uploaded with POST only.\",\n        \"description\": \"Update the File with predefined ID\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"File was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/File\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$fileForm = new Rebilly\\\\Entities\\\\File();\\n$fileForm->setDescription('This is a test file');\\n\\ntry {\\n    $file = $client->files()->update('fileId', $fileForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/File\"\n              }\n            }\n          },\n          \"description\": \"File resource\",\n          \"required\": true\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Delete a File\",\n        \"description\": \"Delete the File with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"File was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->files()->delete('fileId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/files/{id}/download\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Retrieve a file\",\n        \"description\": \"Retrieve a file\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"The file was retrieved successfully\",\n            \"headers\": {\n              \"Content-Length\": {\n                \"description\": \"The number of bytes in the file\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Content-Type\": {\n                \"description\": \"The MIME type of the file\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"readOnly\": true\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/files/{id}/download{extension}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        },\n        {\n          \"name\": \"extension\",\n          \"in\": \"path\",\n          \"description\": \"File extension which also indicates the desired file format\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \".png\",\n              \".jpg\"\n            ]\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Files\"\n        ],\n        \"summary\": \"Used for converting images server-side\",\n        \"description\": \"Used for converting images server-side\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"The file was retrieved successfully\",\n            \"headers\": {\n              \"Content-Length\": {\n                \"description\": \"The number of bytes in the file\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Content-Type\": {\n                \"description\": \"The MIME type of the file\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"string\",\n                  \"readOnly\": true\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        }\n      }\n    },\n    \"/forgot-password\": {\n      \"post\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Sends an email with a link containing a token to reset user password\",\n        \"description\": \"Sends an email with a link containing a token to reset user password\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Email sent successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$forgotPasswordForm = new Rebilly\\\\Entities\\\\Email();\\n$forgotPasswordForm->setEmail('johndoe@test.com');\\n\\ntry {\\n    $client->users()->forgotPassword($forgotPasswordForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Email\"\n              }\n            }\n          },\n          \"description\": \"Email resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/gateway-accounts\": {\n      \"get\": {\n        \"tags\": [\n          \"Gateway Accounts\"\n        ],\n        \"summary\": \"Retrieve a list of gateway accounts\",\n        \"description\": \"Retrieve a list of gateway accounts\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Gateway Accounts was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/GatewayAccount\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$gatewayAccounts = $client->$gatewayAccounts()->search([\\n    'filter' => 'currency:USD',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Gateway Accounts\"\n        ],\n        \"summary\": \"Create a Gateway Account\",\n        \"description\": \"Create a Gateway Account\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Gateway Account was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GatewayAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$gatewayAccountForm = new Rebilly\\\\Entities\\\\GatewayAccount();\\n\\n$gatewayAccountForm->setGatewayName('A1Gateway');\\n$gatewayAccountForm->setAcquirerName('Bank of Rebilly');\\n$gatewayAccountForm->setOrganizationId('organizationId');\\n$gatewayAccountForm->setMerchantCategoryCode(5734);\\n$gatewayAccountForm->setWebsites([\\n    'websiteId1',\\n    'websiteId2',\\n]);\\n$gatewayAccountForm->setPaymentCardSchemes([\\n    Rebilly\\\\Entities\\\\PaymentCardScheme::SCHEME_VISA,\\n    Rebilly\\\\Entities\\\\PaymentCardScheme::SCHEME_MASTERCARD,\\n]);\\n$gatewayAccountForm->setMethod(Rebilly\\\\Entities\\\\PaymentMethod::METHOD_CASH);\\n\\n$gatewayConfig = [\\n    'accountId' => 'test',\\n    'password' => '123',\\n];\\n\\n$gatewayAccountForm->setGatewayConfig($gatewayConfig);\\n\\ntry {\\n    $gatewayAccount = $client->gatewayAccounts()->create($gatewayAccountForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/GatewayAccount\"\n        }\n      }\n    },\n    \"/gateway-accounts/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Gateway Accounts\"\n        ],\n        \"summary\": \"Retrieve a Gateway Account\",\n        \"description\": \"Retrieve a Gateway Account with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Gateway Account was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GatewayAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$gatewayAccount = $client->gatewayAccounts()->load('gatewayAccountId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Gateway Accounts\"\n        ],\n        \"summary\": \"Create or update a Gateway Account with predefined ID\",\n        \"description\": \"Create or update a GatewayAccount with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Gateway Account was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GatewayAccount\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Gateway Account was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GatewayAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$gatewayAccountForm = new Rebilly\\\\Entities\\\\GatewayAccount();\\n\\n$gatewayAccountForm->setGatewayName('A1Gateway');\\n$gatewayAccountForm->setAcquirerName('Bank of Rebilly');\\n$gatewayAccountForm->setOrganizationId('organizationId');\\n$gatewayAccountForm->setMerchantCategoryCode(5734);\\n$gatewayAccountForm->setWebsites([\\n    'websiteId1',\\n    'websiteId2',\\n]);\\n$gatewayAccountForm->setPaymentCardSchemes([\\n    Rebilly\\\\Entities\\\\PaymentCardScheme::SCHEME_VISA,\\n    Rebilly\\\\Entities\\\\PaymentCardScheme::SCHEME_MASTERCARD,\\n]);\\n$gatewayAccountForm->setMethod(Rebilly\\\\Entities\\\\PaymentMethod::METHOD_CASH);\\n\\n$gatewayConfig = [\\n    'accountId' => 'test',\\n    'password' => '123',\\n];\\n\\n$gatewayAccountForm->setGatewayConfig($gatewayConfig);\\n\\ntry {\\n    $gatewayAccount = $client->gatewayAccounts()->update('gatewayAccountId', $gatewayAccountForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/GatewayAccount\"\n        }\n      },\n      \"patch\": {\n        \"tags\": [\n          \"Gateway Accounts\"\n        ],\n        \"summary\": \"Update a Gateway Account with predefined ID\",\n        \"description\": \"Update a GatewayAccount with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Gateway Account was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GatewayAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/GatewayAccount\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Gateway Accounts\"\n        ],\n        \"summary\": \"Delete a Gateway Account\",\n        \"description\": \"Delete a Gateway Account with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Gateway Account was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"$ref\": \"#/components/responses/Conflict\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"try {\\n    $client->gatewayAccounts()->delete('gatewayAccountId');\\n} catch (ServerException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ]\n      }\n    },\n    \"/invoices\": {\n      \"get\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Retrieve a list of invoices\",\n        \"description\": \"Retrieve a list of invoices\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"description\": \"The response media type\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/json\",\n                \"text/csv\"\n              ],\n              \"default\": \"application/json\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of invoices was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Invoice\"\n                  }\n                }\n              },\n              \"text/csv\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Invoice\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoices = $client->invoices()->search([\\n    'filter' => 'customerId:testCustomerId',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Create an invoice\",\n        \"description\": \"Create an invoice\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Invoice was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Invoice\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoiceForm = new Rebilly\\\\Entities\\\\Invoice();\\n$invoiceForm->setCustomerId('customerId');\\n$invoiceForm->setWebsiteId('websiteId');\\n$invoiceForm->setCurrency('USD');\\n\\ntry {\\n    $invoice = $client->invoices()->create($invoiceForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Invoice\"\n        }\n      }\n    },\n    \"/invoices/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Retrieve an invoice\",\n        \"description\": \"Retrieve an invoice with specified identifier string\\n\",\n        \"parameters\": [\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"description\": \"The response media type\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/json\",\n                \"application/pdf\"\n              ],\n              \"default\": \"application/json\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Invoice was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Invoice\"\n                }\n              },\n              \"application/pdf\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Invoice\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoice = $client->invoices()->load('invoiceId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Create or update an invoice with predefined ID\",\n        \"description\": \"Create or update an invoice with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Invoice was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Invoice\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Invoice was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Invoice\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoiceForm = new Rebilly\\\\Entities\\\\Invoice();\\n$invoiceForm->setCustomerId('customerId');\\n$invoiceForm->setWebsiteId('websiteId');\\n$invoiceForm->setCurrency('USD');\\n\\ntry {\\n    $invoice = $client->invoices()->update('invoiceId', $invoiceForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Invoice\"\n        }\n      }\n    },\n    \"/invoices/{id}/abandon\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Abandon an invoice\",\n        \"description\": \"Abandon an invoice with specified identifier string\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Invoice was abandoned successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Invoice\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoice = $client->invoices()->abandon('invoiceId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/invoices/{id}/issue\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Issue an invoice\",\n        \"description\": \"Issue an invoice with specified identifier string\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Invoice was issued successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Invoice\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoice = $client->invoices()->issue('invoiceId', '2025-01-01 05:00:00');\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/InvoiceIssue\"\n              }\n            }\n          },\n          \"description\": \"InvoiceIssue resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/invoices/{id}/items\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Retrieve invoice items\",\n        \"description\": \"Retrieve an invoice items with specified invoice identifier string\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Invoice items were retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/InvoiceItem\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoiceItems = $client->invoiceItems()->search('invoiceId', [\\n    'filter' => 'quantity:5',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Create an invoice item\",\n        \"description\": \"Create an invoice item\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"InvoiceItem was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvoiceItem\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoiceItemForm = new Rebilly\\\\Entities\\\\InvoiceItem();\\n$invoiceItemForm->setType($invoiceItemForm::TYPE_DEBIT);\\n$invoiceItemForm->setUnitPrice(0.99);\\n$invoiceItemForm->setQuantity(5);\\n\\ntry {\\n    $invoiceItem = $client->invoiceItems()->create($invoiceItemForm, 'invoiceId');\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/InvoiceItem\"\n              }\n            }\n          },\n          \"description\": \"InvoiceItem resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/invoices/{id}/lead-source\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Retrieve an invoice's Lead Source\",\n        \"description\": \"Retrieve a Lead Source of given invoice\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lead Source was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoice = $client->invoices()->load('invoiceId');\\n$leadSource = $invoice->getLeadSource();\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Create a Lead Source for an invoice\",\n        \"description\": \"Create a Lead Source for an invoice\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lead Source was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Lead Source was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$leadSourceForm = new Rebilly\\\\Entities\\\\LeadSource();\\n$leadSourceForm->setSource('TestSource');\\n$leadSourceForm->setCampaign('TestCampaign');\\n\\ntry {\\n    $invoice = $client->invoices()->updateLeadSource('invoiceId', $leadSourceForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/LeadSource\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Delete a Lead Source for an invoice\",\n        \"description\": \"Delete a Lead Source that belongs to a certain invoice\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Lead Source was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Lead Source cannot be deleted\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoice = $client->invoices()->deleteLeadSource('invoiceId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/invoices/{id}/void\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Invoices\"\n        ],\n        \"summary\": \"Void an invoice\",\n        \"description\": \"Void an invoice with specified identifier string\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Invoice was voided successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Invoice\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$invoice = $client->invoices()->void('invoiceId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/layouts\": {\n      \"get\": {\n        \"tags\": [\n          \"Layouts\"\n        ],\n        \"summary\": \"Retrieve a layout list\",\n        \"description\": \"Retrieve a layout list\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Layout list was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Layout\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$layouts = $client->layouts()->search([\\n    'filter' => 'name:TestLayout',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Layouts\"\n        ],\n        \"summary\": \"Create a layout\",\n        \"description\": \"Create a layout\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Layout was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Layout\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$layoutForm = new Rebilly\\\\Entities\\\\Layout();\\n$layoutItemForm = new Rebilly\\\\Entities\\\\LayoutItem();\\n\\n$layoutItemForm->setPlanId('planId');\\n$layoutItemForm->setStarred(false);\\n\\n$layoutForm->setName('TestLayout');\\n$layoutForm->setLayoutItems([\\n    $layoutItemForm,\\n]);\\n\\ntry {\\n    $layout = $client->layouts()->create($layoutForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Layout\"\n        }\n      }\n    },\n    \"/layouts/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Layouts\"\n        ],\n        \"summary\": \"Retrieve a layout\",\n        \"description\": \"Retrieve a layout with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Layout was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Layout\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$layout = $client->layouts()->load('layoutId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Layouts\"\n        ],\n        \"summary\": \"Create or update a layout with predefined ID\",\n        \"description\": \"Create or update a layout with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Layout was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Layout\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Layout was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Layout\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$layoutForm = new Rebilly\\\\Entities\\\\Layout();\\n$layoutItemForm = new Rebilly\\\\Entities\\\\LayoutItem();\\n\\n$layoutItemForm->setPlanId('planId');\\n$layoutItemForm->setStarred(false);\\n\\n$layoutForm->setName('TestLayout');\\n$layoutForm->setLayoutItems([\\n    $layoutItemForm,\\n]);\\n\\ntry {\\n    $layout = $client->layouts()->update('layoutId', $layoutForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Layout\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Layouts\"\n        ],\n        \"summary\": \"Delete a layout\",\n        \"description\": \"Delete a layout with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Layout was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->layouts()->delete('layoutId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/lists\": {\n      \"get\": {\n        \"tags\": [\n          \"Lists\"\n        ],\n        \"summary\": \"Retrieve a collection of Lists (latest version of each List)\",\n        \"description\": \"Retrieve a collection of Lists\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionCriteria\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionSort\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A collection of Lists was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/List\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"Lists\"\n        ],\n        \"summary\": \"Create a List\",\n        \"description\": \"Create a List\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"List was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/List\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/List\"\n        }\n      }\n    },\n    \"/lists/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Lists\"\n        ],\n        \"summary\": \"Retrieve list's latest version\",\n        \"description\": \"Retrieve latest version of List with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"List was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/List\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Lists\"\n        ],\n        \"summary\": \"Create or update a list with predefined ID\",\n        \"description\": \"Create or update a list with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"List was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/List\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"List was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/List\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/List\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Lists\"\n        ],\n        \"summary\": \"Delete a list\",\n        \"description\": \"Delete a list with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"List was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"List is used in Rules and cannot be deleted\"\n          }\n        }\n      }\n    },\n    \"/lists/{id}/{version}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        },\n        {\n          \"name\": \"version\",\n          \"in\": \"path\",\n          \"required\": true,\n          \"description\": \"List version\",\n          \"schema\": {\n            \"type\": \"integer\",\n            \"minimum\": 1\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Lists\"\n        ],\n        \"summary\": \"Retrieve List's exact version\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"List's exact version was retrieved successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/List\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/notes\": {\n      \"get\": {\n        \"tags\": [\n          \"Notes\"\n        ],\n        \"summary\": \"Retrieve a list of notes\",\n        \"description\": \"Retrieve a list of notes\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Notes was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Note\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$notes = $client->notes()->search([\\n    'filter' => 'relatedType:customer',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Notes\"\n        ],\n        \"summary\": \"Create a note\",\n        \"description\": \"Create a note\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Note was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Note\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$noteForm = new Rebilly\\\\Entities\\\\Note();\\n$noteForm->setRelatedId('customerId');\\n$noteForm->setRelatedType(Rebilly\\\\Entities\\\\ResourceType::TYPE_CUSTOMER);\\n$noteForm->setContent('Test Note');\\n\\ntry {\\n    $note = $client->notes()->create($noteForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Note\"\n        }\n      }\n    },\n    \"/notes/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Notes\"\n        ],\n        \"summary\": \"Retrieve a note\",\n        \"description\": \"Retrieve a note with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Note was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Note\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$note = $client->notes()->load('noteId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Notes\"\n        ],\n        \"summary\": \"Create or update a note with predefined ID\",\n        \"description\": \"Create or update a note with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Note was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Note\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Note was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Note\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$noteForm = new Rebilly\\\\Entities\\\\Note();\\n$noteForm->setRelatedId('customerId');\\n$noteForm->setRelatedType(Rebilly\\\\Entities\\\\ResourceType::TYPE_CUSTOMER);\\n$noteForm->setContent('Test Note');\\n\\ntry {\\n    $note = $client->notes()->update('noteId', $noteForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Note\"\n        }\n      }\n    },\n    \"/organizations\": {\n      \"get\": {\n        \"tags\": [\n          \"Organizations\"\n        ],\n        \"summary\": \"Retrieve a list of organizations\",\n        \"description\": \"Retrieve a list of organizations\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of organizations was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Organization\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$organizations = $client->organizations()->search([\\n    'filter' => 'city:Test',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Organizations\"\n        ],\n        \"summary\": \"Create a organization\",\n        \"description\": \"Create a organization\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Organization was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Organization\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$organizationForm = new Rebilly\\\\Entities\\\\Organization();\\n$organizationForm->setName('Test Organization');\\n$organizationForm->setCountry('US');\\n\\ntry {\\n    $organization = $client->organizations()->create($organizationForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Organization\"\n        }\n      }\n    },\n    \"/organizations/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Organizations\"\n        ],\n        \"summary\": \"Retrieve a organization\",\n        \"description\": \"Retrieve a organization with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Organization was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Organization\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$organization = $client->organizations()->load('organizationId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Organizations\"\n        ],\n        \"summary\": \"Create or update a organization with predefined ID\",\n        \"description\": \"Create or update a organization with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Organization was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Organization\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Organization was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Organization\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$organizationForm = new Rebilly\\\\Entities\\\\Organization();\\n$organizationForm->setName('Test Organization');\\n$organizationForm->setCountry('US');\\n\\ntry {\\n    $organization = $client->organizations()->update('organizationId', $organizationForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Organization\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Organizations\"\n        ],\n        \"summary\": \"Delete a organization\",\n        \"description\": \"Delete a organization with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Organization was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Organization has related resources and cannot be deleted\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/password-tokens\": {\n      \"get\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Retrieve a list of tokens\",\n        \"description\": \"Retrieve a list of tokens\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Reset Password Tokens was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ResetPasswordToken\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$resetPasswordTokens = $client->resetPasswordTokens()->search([\\n    'filter' => 'token:string',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Create a Reset Password Token\",\n        \"description\": \"Create a Reset Password Token\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Reset Password Token was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ResetPasswordToken\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$resetPasswordTokenForm = new Rebilly\\\\Entities\\\\ResetPasswordToken();\\n$resetPasswordTokenForm->setUserName('test');\\n$resetPasswordTokenForm->setPassword('1234');\\n\\ntry {\\n    $$resetPasswordToken = $client->resetPasswordTokens()->create($resetPasswordTokenForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ResetPasswordToken\"\n              }\n            }\n          },\n          \"description\": \"ResetPasswordToken resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/password-tokens/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Retrieve a Reset Password Token\",\n        \"description\": \"Retrieve a Reset Password Token with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"ResetPasswordToken was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ResetPasswordToken\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$resetPasswordToken = $client->resetPasswordTokens()->load('tokenId');\\n\"\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Customer Authentication\"\n        ],\n        \"summary\": \"Delete a Reset Password Token\",\n        \"description\": \"Delete a Reset Password Token with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"ResetPasswordToken was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"ResetPasswordToken has related resources and cannot be deleted\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"try {\\n    $client->websites()->delete('websiteId');\\n} catch (ServerException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ]\n      }\n    },\n    \"/payment-cards-migrations\": {\n      \"get\": {\n        \"tags\": [\n          \"Migrate payment cards\"\n        ],\n        \"summary\": \"Retrieve a list of payment cards ready for migration\",\n        \"description\": \"Retrieve a list of payment cards ready for migration\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of payment cards was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PaymentCard\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCardMigrations = $client->paymentCardMigrations()->search([\\n    'filter' => 'status:active',\\n]);\\n\"\n          }\n        ]\n      }\n    },\n    \"/payment-cards-migrations/migrate\": {\n      \"post\": {\n        \"tags\": [\n          \"Migrate payment cards\"\n        ],\n        \"summary\": \"Migrate payment cards to another gateway account\",\n        \"description\": \"Migrate payment cards to another gateway account\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Migration command was accepted\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentCardMigrationResponse\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCardMigrationForm = new Rebilly\\\\Entities\\\\PaymentCardMigrationsRequest();\\n$paymentCardMigrationForm->setFromGatewayAccountId('gatewayAccountId');\\n$paymentCardMigrationForm->setToGatewayAccountId('newGatewayAccountId');\\n\\n$paymentCardIds = [\\n    'testPaymentCardId',\\n    'testPaymentCardId2',\\n];\\n\\n$paymentCardMigrationForm->setPaymentCardIds($paymentCardIds)\\n\\ntry {\\n    $paymentCardMigrationResponse = $client->paymentCardMigrations()->migrate($paymentCardMigrationForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PaymentCardMigrationRequest\"\n              }\n            }\n          },\n          \"description\": \"Payment card migration attributes\",\n          \"required\": true\n        }\n      }\n    },\n    \"/payment-cards\": {\n      \"get\": {\n        \"tags\": [\n          \"Payment Cards\"\n        ],\n        \"summary\": \"Retrieve a list of Payment Cards\",\n        \"description\": \"Retrieve a list of Payments Cards\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Payment Card was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PaymentCard\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCards = $client->paymentCards()->search([\\n    'filter' => 'status:active',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Payment Cards\"\n        ],\n        \"summary\": \"Create a Payment Card\",\n        \"description\": \"Create a Payment Card\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Payment Card was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentCard\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCardForm = new Rebilly\\\\Entities\\\\PaymentCard();\\n$paymentCardForm->setCustomerId('customerId');\\n$paymentCardForm->setPan('4111111111111111');\\n$paymentCardForm->setExpYear(2025);\\n$paymentCardForm->setExpMonth(8);\\n$paymentCardForm->setBillingContactId('contactId');\\n\\ntry {\\n    $paymentCard = $client->paymentCards()->create($paymentCardForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PaymentCard\"\n              }\n            }\n          },\n          \"description\": \"PaymentCard resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/payment-cards/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Payment Cards\"\n        ],\n        \"summary\": \"Retrieve a Payment Card\",\n        \"description\": \"Retrieve a Payment Card with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"PaymentCard was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentCard\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCard = $client->paymentCards()->load('paymentCardId');\\n\"\n          }\n        ]\n      },\n      \"patch\": {\n        \"tags\": [\n          \"Payment Cards\"\n        ],\n        \"summary\": \"Update a payment card's cvv value with predefined ID\",\n        \"description\": \"Update a payment card's cvv value with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Gateway Account was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentCard\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"cvv\": {\n                    \"description\": \"Card's cvv (card verification value).\",\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"description\": \"Payment card\",\n          \"required\": true\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Payment Cards\"\n        ],\n        \"summary\": \"Create a payment card with predefined ID\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Payment card was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentCard\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"409\": {\n            \"description\": \"Payment card already exists and cannot be updated\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCardForm = new Rebilly\\\\Entities\\\\PaymentCard();\\n$paymentCardForm->setCustomerId('customerId');\\n$paymentCardForm->setPan('4111111111111111');\\n$paymentCardForm->setExpYear(2025);\\n$paymentCardForm->setExpMonth(8);\\n$paymentCardForm->setBillingContactId('contactId');\\n\\ntry {\\n    $paymentCard = $client->paymentCards()->create($paymentCardForm, 'paymentCardId');\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PaymentCard\"\n              }\n            }\n          },\n          \"description\": \"Payment card\",\n          \"required\": true\n        }\n      }\n    },\n    \"/payment-cards/{id}/authorization\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Payment Cards\"\n        ],\n        \"summary\": \"Authorize a Payment Card\",\n        \"description\": \"Authorize a Payment Card\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Authorization successful\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentCard\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCardAuthorizationForm = new Rebilly\\\\Entities\\\\PaymentCardAuthorization();\\n$paymentCardAuthorizationForm->setWebsiteId('websiteId');\\n$paymentCardAuthorizationForm->setCurrency('USD');\\n$paymentCardAuthorizationForm->setGatewayAccountId('gatewayAccountId');\\n\\ntry {\\n    $paymentCard = $client->paymentCards()->authorize('paymentCardId', $paymentCardAuthorizationForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\n                  \"websiteId\",\n                  \"currency\"\n                ],\n                \"properties\": {\n                  \"websiteId\": {\n                    \"description\": \"The Website ID\",\n                    \"type\": \"string\"\n                  },\n                  \"currency\": {\n                    \"description\": \"Currency (three letter code)\",\n                    \"type\": \"string\"\n                  },\n                  \"gatewayAccountId\": {\n                    \"description\": \"The Gateway account ID\",\n                    \"type\": \"string\"\n                  },\n                  \"amount\": {\n                    \"description\": \"Amount\",\n                    \"type\": \"number\",\n                    \"format\": \"double\"\n                  }\n                }\n              }\n            }\n          },\n          \"description\": \"Payment Card resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/payment-cards/{id}/deactivation\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Payment Cards\"\n        ],\n        \"summary\": \"Deactivate a Payment Card\",\n        \"description\": \"Deactivate a Payment Card\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Authorization successful\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentCard\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->paymentCards()->deactivate('paymentCardId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/payments\": {\n      \"get\": {\n        \"tags\": [\n          \"Payments\"\n        ],\n        \"summary\": \"Retrieve a payment list\",\n        \"description\": \"Retrieve a payment list\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"description\": \"The response media type\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/json\",\n                \"text/csv\"\n              ],\n              \"default\": \"application/json\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Payment list was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Payment\"\n                  }\n                }\n              },\n              \"text/csv\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Payment\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$payments = $client->payments()->search([\\n    'filter' => 'currency:USD',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Payments\"\n        ],\n        \"summary\": \"Create a payment\",\n        \"description\": \"Create a payment\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Payment was processed\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Payment\"\n                  }\n                }\n              }\n            }\n          },\n          \"202\": {\n            \"description\": \"Payment was accepted\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Payment\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"409\": {\n            \"$ref\": \"#/components/responses/Conflict\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentForm = new Rebilly\\\\Entities\\\\Payment();\\n\\n$paymentForm->setWebsiteId('websiteId');\\n$paymentForm->setCustomerId('customerId');\\n$paymentForm->setCurrency('USD');\\n$paymentForm->setAmount(1.99);\\n\\n$data = [\\n    'method' => Rebilly\\\\Entities\\\\PaymentMethod::METHOD_CASH,\\n];\\n\\n$paymentInstrumentForm = new Rebilly\\\\Entities\\\\PaymentMethodInstrument($data);\\n\\n$paymentForm->setPaymentInstrument($paymentInstrumentForm);\\n\\ntry {\\n    $payment = $client->payments()->create($paymentForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Payment\"\n        }\n      }\n    },\n    \"/payments/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Payments\"\n        ],\n        \"summary\": \"Retrieve a payment\",\n        \"description\": \"Retrieve a payment with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Payment was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Payment\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$payment = $client->payments()->load('paymentId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Payments\"\n        ],\n        \"summary\": \"Create a payment with predefined ID\",\n        \"description\": \"Make a payment with predefined identifier string\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Payment was processed\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Payment\"\n                  }\n                }\n              }\n            }\n          },\n          \"202\": {\n            \"description\": \"Payment was accepted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Payment\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentForm = new Rebilly\\\\Entities\\\\Payment();\\n\\n$paymentForm->setWebsiteId('websiteId');\\n$paymentForm->setCustomerId('customerId');\\n$paymentForm->setCurrency('USD');\\n$paymentForm->setAmount(1.99);\\n\\n$data = [\\n    'method' => Rebilly\\\\Entities\\\\PaymentMethod::METHOD_CASH,\\n];\\n\\n$paymentInstrumentForm = new Rebilly\\\\Entities\\\\PaymentMethodInstrument($data);\\n\\n$paymentForm->setPaymentInstrument($paymentInstrumentForm);\\n\\ntry {\\n    $payment = $client->payments()->update('paymentId', $paymentForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Payment\"\n        }\n      }\n    },\n    \"/paypal-accounts\": {\n      \"get\": {\n        \"tags\": [\n          \"PayPal Accounts\"\n        ],\n        \"summary\": \"Retrieve a list of PayPal accounts\",\n        \"description\": \"Retrieve a list of PayPal Accounts\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of PayPal Accounts was retrieved successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PayPalAccount\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"PayPal Accounts\"\n        ],\n        \"summary\": \"Create a PayPal Account\",\n        \"description\": \"Create a PayPal Account\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"PayPal Account was created\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PayPalAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PayPalAccount\"\n              }\n            }\n          },\n          \"description\": \"PayPalAccount resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/paypal-accounts/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"PayPal Accounts\"\n        ],\n        \"summary\": \"Retrieve a PayPal Account\",\n        \"description\": \"Retrieve a PayPal Account with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"PayPal Account was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PayPalAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"PayPal Accounts\"\n        ],\n        \"summary\": \"Create a PayPal account with predefined ID\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"PayPal Account was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PayPalAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"409\": {\n            \"description\": \"PayPal Account exist and cannot be updated\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Error\"\n                }\n              }\n            }\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/PayPalAccount\"\n              }\n            }\n          },\n          \"description\": \"PayPal Account\",\n          \"required\": true\n        }\n      }\n    },\n    \"/paypal-accounts/{id}/activation\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"PayPal Accounts\"\n        ],\n        \"summary\": \"Activate a PayPal Account\",\n        \"description\": \"Activate a PayPal Account\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Activate successful\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PayPalAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"type\": \"object\",\n                \"required\": [\n                  \"websiteId\",\n                  \"currency\"\n                ],\n                \"properties\": {\n                  \"websiteId\": {\n                    \"description\": \"The Website ID\",\n                    \"type\": \"string\"\n                  },\n                  \"currency\": {\n                    \"description\": \"Currency (three letter code)\",\n                    \"type\": \"string\"\n                  },\n                  \"amount\": {\n                    \"description\": \"The amount to authorize\",\n                    \"type\": \"number\",\n                    \"format\": \"double\",\n                    \"default\": 1\n                  },\n                  \"redirectURLs\": {\n                    \"description\": \"Redirect URLs\",\n                    \"type\": \"object\"\n                  },\n                  \"gatewayAccountId\": {\n                    \"description\": \"The Gateway Account ID which use to send transactions\",\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"description\": \"PayPal Account resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/paypal-accounts/{id}/deactivation\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"PayPal Accounts\"\n        ],\n        \"summary\": \"Deactivate a PayPal Account\",\n        \"description\": \"Deactivate a PayPal Account\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Deactivate successful\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PayPalAccount\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/plans\": {\n      \"get\": {\n        \"tags\": [\n          \"Plans\"\n        ],\n        \"summary\": \"Retrieve a list of plans\",\n        \"description\": \"Retrieve a list of plans\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Plans was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Plan\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$plans = $client->plans()->search([\\n    'filter' => 'name:TestPlan',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Plans\"\n        ],\n        \"summary\": \"Create a plan\",\n        \"description\": \"Create a plan\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Plan was created\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Plan\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$planForm = new Rebilly\\\\Entities\\\\Plan();\\n$planForm->setName('TestPlan');\\n$planForm->setCurrency('USD');\\n$planForm->setTrialAmount(1);\\n$planForm->setTrialPeriodUnit('day');\\n$planForm->setTrialPeriodLength(1);\\n\\ntry {\\n    $plan = $client->plans()->create($planForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Plan\"\n        }\n      }\n    },\n    \"/plans/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Plans\"\n        ],\n        \"summary\": \"Retrieve a plan\",\n        \"description\": \"Retrieve a plan with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Plan was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Plan\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$plan = $client->plans()->load('planId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Plans\"\n        ],\n        \"summary\": \"Create or update a Plan with predefined ID\",\n        \"description\": \"Create or update a Plan with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Plan was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Plan\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Plan was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Plan\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$planForm = new Rebilly\\\\Entities\\\\Plan();\\n$planForm->setName('TestPlan');\\n$planForm->setCurrency('USD');\\n$planForm->setTrialAmount(1);\\n$planForm->setTrialPeriodUnit('day');\\n$planForm->setTrialPeriodLength(1);\\n\\ntry {\\n    $plan = $client->plans()->update('planId', $planForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Plan\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Plans\"\n        ],\n        \"summary\": \"Delete a Plan\",\n        \"description\": \"Delete a Plan with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Plan was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->plans()->delete('planId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/previews/rule-actions/send-email\": {\n      \"post\": {\n        \"tags\": [\n          \"Rules\"\n        ],\n        \"summary\": \"Send a test email\",\n        \"description\": \"Send a test email\\n\",\n        \"security\": [\n          {\n            \"RebAuth\": []\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Test email was sent\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SendTestEmail\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SendTestEmail\"\n              }\n            }\n          },\n          \"description\": \"Test email resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/previews/rule-actions/trigger-webhook\": {\n      \"post\": {\n        \"tags\": [\n          \"Rules\"\n        ],\n        \"summary\": \"Trigger a test webhook\",\n        \"description\": \"Trigger a test webhook\\n\",\n        \"security\": [\n          {\n            \"RebAuth\": []\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Test webhook was triggered\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SendPreviewWebhook\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SendPreviewWebhook\"\n              }\n            }\n          },\n          \"description\": \"Test webhook resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/previews/webhooks\": {\n      \"post\": {\n        \"tags\": [\n          \"Webhooks\"\n        ],\n        \"summary\": \"Trigger a test webhook\",\n        \"description\": \"Trigger a test webhook\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Test webhook was triggered\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/GlobalWebhook\"\n        }\n      }\n    },\n    \"/products\": {\n      \"get\": {\n        \"tags\": [\n          \"Products\"\n        ],\n        \"summary\": \"Retrieve a list of products\",\n        \"description\": \"Retrieve a list of products\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of products was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Product\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"Products\"\n        ],\n        \"summary\": \"Create a Product\",\n        \"description\": \"Create a Product\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Product was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Product\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Product\"\n        }\n      }\n    },\n    \"/products/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Products\"\n        ],\n        \"summary\": \"Retrieve a product\",\n        \"description\": \"Retrieve a product with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Product was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Product\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Products\"\n        ],\n        \"summary\": \"Create a product with predefined ID\",\n        \"description\": \"Create a product with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Product was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Product\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Product was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Product\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Product\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Products\"\n        ],\n        \"summary\": \"Delete a product\",\n        \"description\": \"Delete a product with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Product was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/profile\": {\n      \"get\": {\n        \"tags\": [\n          \"Profile\"\n        ],\n        \"summary\": \"Retrieve user's profile\",\n        \"description\": \"Retrieve user's profile\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Profile was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Profile\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Profile\"\n        ],\n        \"summary\": \"Update user's profile\",\n        \"description\": \"Update user's profile\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Profile was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Profile\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Profile\"\n              }\n            }\n          },\n          \"description\": \"Profile resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/profile/password\": {\n      \"post\": {\n        \"tags\": [\n          \"Profile\"\n        ],\n        \"summary\": \"Updates user's password with the specified newPassword\",\n        \"description\": \"Updates user's password with the specified newPassword. And checks if currentPassword matches the actual one.\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Password updated successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Profile\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/UpdatePassword\"\n        }\n      }\n    },\n    \"/profile/totp-reset\": {\n      \"post\": {\n        \"tags\": [\n          \"Profile\"\n        ],\n        \"summary\": \"Reset (renew) totpSecret\",\n        \"description\": \"Reset (renew) totpSecret\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"totpSecret reset (renewed) successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Profile\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/queue/custom-events\": {\n      \"get\": {\n        \"tags\": [\n          \"Custom Events\"\n        ],\n        \"summary\": \"Retrieve a list of scheduled custom events\",\n        \"description\": \"Retrieve a list of scheduled custom events\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of scheduled custom events was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/CustomEvent\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      }\n    },\n    \"/queue/custom-events/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Custom Events\"\n        ],\n        \"summary\": \"Retrieve a scheduled custom event\",\n        \"description\": \"Retrieve a scheduled custom event with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Scheduled custom event was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CustomEvent\"\n                }\n              }\n            }\n          },\n          \"303\": {\n            \"description\": \"Custom event was successfully processed and moved out from queue\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/CustomEvent\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Custom Events\"\n        ],\n        \"summary\": \"Delete a scheduled custom event\",\n        \"description\": \"Delete a scheduled custom event with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"description\": \"Scheduled custom event was deleted\"\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/queue/payments\": {\n      \"get\": {\n        \"tags\": [\n          \"Payments\"\n        ],\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"summary\": \"Retrieve a scheduled payment list\",\n        \"description\": \"Retrieve a scheduled payment list\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful retrieve the payments list that still waiting to be processed\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Payment\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$payments = $client->payments()->searchInQueue([\\n    'filter' => 'currency:USD',\\n]);\\n\"\n          }\n        ]\n      }\n    },\n    \"/queue/payments/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Payments\"\n        ],\n        \"summary\": \"Retrieve a scheduled payment\",\n        \"description\": \"Retrieve a payment with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Successful retrieve the payment that still waiting to be processed\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Payment\"\n                }\n              }\n            }\n          },\n          \"303\": {\n            \"description\": \"Payment was successfully processed and moved out from queue\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Payment\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$payment = $client->payments()->loadFromQueue('paymentId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Payments\"\n        ],\n        \"summary\": \"Update pending payment\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Payment was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Payment\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Payment is already handled and cannot be updated\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Payment\"\n        }\n      }\n    },\n    \"/sessions\": {\n      \"get\": {\n        \"tags\": [\n          \"Sessions\"\n        ],\n        \"summary\": \"Retrieve a list of sessions\",\n        \"description\": \"Retrieve a list of sessions\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Sessions was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Session\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$sessions = $client->sessions()->search([\\n    'filter' => 'userId:testUserId',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Sessions\"\n        ],\n        \"summary\": \"Create a session\",\n        \"description\": \"Create a session\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Session was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Session\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$sessionForm = new Rebilly\\\\Entities\\\\Session();\\n\\n$permissions = [\\n    // Example permission to use GET and POST methods only for certain Customers\\n    [\\n        'resourceName' => Rebilly\\\\Entities\\\\ResourceType::TYPE_CUSTOMERS,\\n        'methods' => [\\n            $sessionForm::METHOD_GET,\\n            $sessionForm::METHOD_POST,\\n        ],\\n        'resourceIds' => [\\n            'testCustomerId',\\n            'testCustomerId2',\\n        ],\\n    ],\\n    // Example permission to use all methods for Websites resource\\n    [\\n        'resourceName' => Rebilly\\\\Entities\\\\ResourceType::TYPE_WEBSITES,\\n        'methods' => [\\n            $sessionForm::METHOD_GET,\\n            $sessionForm::METHOD_POST,\\n            $sessionForm::METHOD_PUT,\\n            $sessionForm::METHOD_HEAD,\\n            $sessionForm::METHOD_DELETE,\\n        ],\\n    ],\\n    // Example permission to use all methods for all resources\\n    [],\\n];\\n\\n$sessionForm->setPermissions($permissions);\\n\\ntry {\\n    $session = $client->sessions()->create($sessionForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Session\"\n              }\n            }\n          },\n          \"description\": \"Sessions resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/sessions/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Sessions\"\n        ],\n        \"summary\": \"Retrieve a Session\",\n        \"description\": \"Retrieve a Session with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Session was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Session\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$session = $client->sessions()->load('sessionId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Sessions\"\n        ],\n        \"summary\": \"Create or update a Session with predefined ID\",\n        \"description\": \"Create or update a Session with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Session was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Session\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Session was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Session\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$sessionForm = new Rebilly\\\\Entities\\\\Session();\\n\\n$permissions = [\\n    [\\n        'resourceName' => Rebilly\\\\Entities\\\\ResourceType::TYPE_CUSTOMERS,\\n        'methods' => [\\n            $sessionForm::METHOD_GET,\\n            $sessionForm::METHOD_POST,\\n        ],\\n        'resourceIds' => [\\n            'testCustomerId',\\n            'testCustomerId2',\\n        ],\\n    ],\\n    [\\n        'resourceName' => Rebilly\\\\Entities\\\\ResourceType::TYPE_WEBSITES,\\n        'methods' => [\\n            $sessionForm::METHOD_GET,\\n            $sessionForm::METHOD_POST,\\n        ],\\n        'resourceIds' => [\\n            'testWebsiteId',\\n            'testWebsiteId2',\\n        ],\\n    ],\\n];\\n\\n$sessionForm->setPermissions($permissions);\\n\\ntry {\\n    $session = $client->sessions()->update('sessionId', $sessionForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Session\"\n              }\n            }\n          },\n          \"description\": \"Session resource\",\n          \"required\": true\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Sessions\"\n        ],\n        \"summary\": \"Delete a Session\",\n        \"description\": \"Delete a Session with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Session was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Session has related resources and cannot be deleted\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"try {\\n    $client->sessions()->delete('sessionId');\\n} catch (ServerException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ]\n      }\n    },\n    \"/shipping-zones\": {\n      \"get\": {\n        \"tags\": [\n          \"Shipping Zones\"\n        ],\n        \"summary\": \"Retrieve a list of shipping zones\",\n        \"description\": \"Retrieve a list of shipping zones\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of shipping zones was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ShippingZone\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"Shipping Zones\"\n        ],\n        \"summary\": \"Create a Shipping Zone\",\n        \"description\": \"Create a Shipping Zone\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Shipping Zone was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ShippingZone\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ShippingZone\"\n              }\n            }\n          },\n          \"description\": \"Shipping Zone resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/shipping-zones/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Shipping Zones\"\n        ],\n        \"summary\": \"Retrieve a shipping zone\",\n        \"description\": \"Retrieve a shipping zone with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Shipping zone was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ShippingZone\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Shipping Zones\"\n        ],\n        \"summary\": \"Create a shipping zone with predefined ID\",\n        \"description\": \"Create a shipping zone with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Shipping zone was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ShippingZone\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Shipping zone was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ShippingZone\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ShippingZone\"\n              }\n            }\n          },\n          \"description\": \"Shipping zone resource\",\n          \"required\": true\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Shipping Zones\"\n        ],\n        \"summary\": \"Delete a shipping zone\",\n        \"description\": \"Delete a shipping zone with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Shipping zone was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/signin\": {\n      \"post\": {\n        \"tags\": [\n          \"Users\",\n          \"Sessions\"\n        ],\n        \"summary\": \"Create a session with email and password\",\n        \"description\": \"Create a session with email and password\\n\",\n        \"security\": [],\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Session was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Session\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$loginForm = new Rebilly\\\\Entities\\\\Login();\\n$loginForm->setEmail('test@test.com');\\n$loginForm->setPassword('1234');\\n\\ntry {\\n    $user = $client->users()->signin($loginForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Signin\"\n              }\n            }\n          },\n          \"description\": \"Signin resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/signup\": {\n      \"post\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Creates a new user and sends an email confirmation\",\n        \"description\": \"Creates a new user and sends an email confirmation\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"User was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$signupForm = new Rebilly\\\\Entities\\\\Signup();\\n$signupForm->setFirstName('John');\\n$signupForm->setLastName('Doe');\\n$signupForm->setEmail('johndoe@test.com');\\n$signupForm->setBusinessPhone('+123456789');\\n$signupForm->setPassword('1234');\\n\\ntry {\\n    $client->users()->signup($signupForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Signup\"\n              }\n            }\n          },\n          \"description\": \"Signup resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/status\": {\n      \"get\": {\n        \"tags\": [\n          \"Status\"\n        ],\n        \"summary\": \"Retrieve API current status\",\n        \"description\": \"Retrieve API current status\\n\",\n        \"security\": [],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Status was received\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Status\"\n                }\n              }\n            }\n          }\n        }\n      }\n    },\n    \"/subscriptions\": {\n      \"get\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Retrieve a list of subscriptions\",\n        \"description\": \"Retrieve a list of subscriptions\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"description\": \"The response media type\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/json\",\n                \"text/csv\"\n              ],\n              \"default\": \"application/json\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of subscriptions was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Subscription\"\n                  }\n                }\n              },\n              \"text/csv\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Subscription\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$subscriptions = $client->subscriptions()->search([\\n    'filter' => 'customerId:testCustomerId',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Create a subscription\",\n        \"description\": \"Create a subscription\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Subscription was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Subscription\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$subscriptionForm = new Rebilly\\\\Entities\\\\Subscription();\\n$subscriptionForm->setCustomerId('customerId');\\n$subscriptionForm->setWebsiteId('websiteId');\\n$subscriptionForm->setPlanId('planId');\\n\\ntry {\\n    $subscription = $client->subscriptions()->create($subscriptionForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Subscription\"\n        }\n      }\n    },\n    \"/subscriptions/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Retrieve a subscription\",\n        \"description\": \"Retrieve a subscription with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Subscription was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Subscription\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$subscription = $client->subscriptions()->load('subscriptionId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Create or update a subscription with predefined ID\",\n        \"description\": \"Create or update a subscription with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Subscription was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Subscription\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Subscription was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Subscription\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$subscriptionForm = new Rebilly\\\\Entities\\\\Subscription();\\n$subscriptionForm->setCustomerId('customerId');\\n$subscriptionForm->setWebsiteId('websiteId');\\n$subscriptionForm->setPlanId('planId');\\n\\ntry {\\n    $subscription = $client->subscriptions()->update('subscriptionId', $subscriptionForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Subscription\"\n        }\n      }\n    },\n    \"/subscriptions/{id}/cancel\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Cancel a subscription\",\n        \"description\": \"Cancel a subscription\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Subscription was switched\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Subscription\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$subscriptionCancelForm = new Rebilly\\\\Entities\\\\SubscriptionCancel();\\n$subscriptionCancelForm->setPolicy($subscriptionCancelForm::NOW);\\n\\ntry {\\n    $subscription = $client->subscriptions()->cancel('subscriptionId', $subscriptionCancelForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SubscriptionCancel\"\n              }\n            }\n          },\n          \"description\": \"Only policy\",\n          \"required\": true\n        }\n      }\n    },\n    \"/subscriptions/{id}/lead-source\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Retrieve a subscription's Lead Source\",\n        \"description\": \"Retrieve a Lead Source of given subscription\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lead Source was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$subscription = $client->subscriptions()->load('subscriptionId');\\n$leadSource = $subscription->getLeadSource();\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Create a Lead Source for a Subscription\",\n        \"description\": \"Create a Lead Source for a Subscription\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lead Source was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Lead Source was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$leadSourceForm = new Rebilly\\\\Entities\\\\LeadSource();\\n$leadSourceForm->setSource('TestSource');\\n$leadSourceForm->setCampaign('TestCampaign');\\n\\ntry {\\n    $subscription = $client->subscriptions()->updateLeadSource('subscriptionId', $leadSourceForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/LeadSource\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Delete a Lead Source for a Subscription\",\n        \"description\": \"Delete a Lead Source that belongs to a certain Subscription\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Lead Source was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Lead Source cannot be deleted\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$subscription = $client->subscriptions()->deleteLeadSource('subscriptionId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/subscriptions/{id}/switch\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Subscriptions\"\n        ],\n        \"summary\": \"Switch a subscription\",\n        \"description\": \"Switch a subscription\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Subscription was switched\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Subscription\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$subscriptionSwitchForm = new Rebilly\\\\Entities\\\\SubscriptionSwitch();\\n$subscriptionSwitchForm->setPlanId('newPlanId');\\n$subscriptionSwitchForm->setPolicy($subscriptionSwitchForm::NOW);\\n\\ntry {\\n    $subscription = $client->subscriptions()->switchTo('subscriptionId', $subscriptionSwitchForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/SubscriptionSwitch\"\n              }\n            }\n          },\n          \"description\": \"SubscriptionSwitch resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/tax-categories\": {\n      \"get\": {\n        \"tags\": [\n          \"Taxes\"\n        ],\n        \"summary\": \"Retrieve a list of tax categories\",\n        \"description\": \"Retrieve a list of tax categories\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of tax categories was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/TaxCategory\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      }\n    },\n    \"/tokens\": {\n      \"get\": {\n        \"tags\": [\n          \"Payment Tokens\"\n        ],\n        \"summary\": \"Retrieve a list of tokens\",\n        \"description\": \"Retrieve a list of tokens\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of tokens was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/PaymentToken\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCardTokens = $client->paymentCardTokens()->search([\\n    'filter' => 'token:string',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Payment Tokens\"\n        ],\n        \"summary\": \"Create a payment token\",\n        \"description\": \"Create a token\\n\",\n        \"security\": [\n          {\n            \"RebAuth\": []\n          }\n        ],\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Token was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentToken\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCardTokenForm = new Rebilly\\\\Entities\\\\PaymentCardToken();\\n$paymentCardTokenForm->setFirstName('John');\\n$paymentCardTokenForm->setLastName('Doe');\\n$paymentCardTokenForm->setAddress('1313 Main Street');\\n$paymentCardTokenForm->setCity('Gotham');\\n$paymentCardTokenForm->setPostalCode('12345');\\n$paymentCardTokenForm->setRegion('NY');\\n$paymentCardTokenForm->setCountry('US');\\n\\n$paymentInstrumentForm = new Entities\\\\PaymentInstruments\\\\PaymentCardPaymentInstrument();\\n$paymentInstrumentForm->setPan('4111111111111111');\\n$paymentInstrumentForm->setExpYear(2025);\\n$paymentInstrumentForm->setExpMonth(8);\\n$paymentInstrumentForm->setCvv(123);\\n\\n$paymentCardTokenForm->setPaymentInstrument($paymentInstrumentForm);\\n\\ntry {\\n    $paymentCardToken = $client->paymentCardTokens()->create($paymentCardTokenForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/PaymentToken\"\n        }\n      }\n    },\n    \"/tokens/{token}\": {\n      \"parameters\": [\n        {\n          \"name\": \"token\",\n          \"in\": \"path\",\n          \"description\": \"The token identifier string\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\"\n          }\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Payment Tokens\"\n        ],\n        \"summary\": \"Retrieve a token\",\n        \"description\": \"Retrieve a token with specified identifier string\\n\",\n        \"security\": [\n          {\n            \"RebAuth\": []\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Token was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentToken\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$paymentCardToken = $client->paymentCardTokens()->load('tokenId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/tokens/{token}/expiration\": {\n      \"parameters\": [\n        {\n          \"name\": \"token\",\n          \"in\": \"path\",\n          \"description\": \"The token identifier string\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\"\n          }\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Payment Tokens\"\n        ],\n        \"summary\": \"Expire a token\",\n        \"description\": \"Expire a token\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Token expiration successful\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/PaymentToken\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"try {\\n    $paymentCardToken = $client->paymentCardTokens()->expire('tokenId');\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/PaymentToken\"\n        }\n      }\n    },\n    \"/tracking/api\": {\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve a list of tracking API logs\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"description\": \"The response media type\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/json\",\n                \"text/csv\"\n              ],\n              \"default\": \"application/json\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Tracking API logs was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/ApiTracking\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$apiTrackingLog = $client->apiTracking()->search([\\n    'filter' => 'status:200',\\n]);\\n\"\n          }\n        ]\n      }\n    },\n    \"/tracking/api/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve a tracking API log with specified identifier string\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Tracking API log was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ApiTracking\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$apiTrackingLog = $client->apiTracking()->load('apiLogId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/tracking/lists\": {\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve Lists changes history\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lists changes history was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/List\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      }\n    },\n    \"/tracking/subscriptions\": {\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve a list of tracking subscription logs\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Tracking subscription logs was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/SubscriptionTracking\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      }\n    },\n    \"/tracking/subscriptions/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve a tracking subscription log with specified identifier string\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Tracking subscription log was retrieved successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/SubscriptionTracking\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/tracking/webhooks\": {\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve a list of tracking webhook notifications\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionSort\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionCriteria\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Tracking webhook notifications was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/WebhookTracking\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      }\n    },\n    \"/tracking/webhooks/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve a tracking webhook notification with specified identifier string\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Tracking webhook notification was retrieved successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/WebhookTracking\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/tracking/website-webhooks\": {\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve a list of tracking webhook notifications\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Tracking webhook notifications was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/WebsiteWebhookTracking\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      }\n    },\n    \"/tracking/website-webhooks/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Tracking\"\n        ],\n        \"summary\": \"Retrieve a tracking webhook notification with specified identifier string\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Tracking webhook notification was retrieved successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/WebsiteWebhookTracking\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/transactions\": {\n      \"get\": {\n        \"tags\": [\n          \"Transactions\"\n        ],\n        \"summary\": \"Retrieve a list of transactions\",\n        \"description\": \"Retrieve a list of transactions\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionFilter\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionQuery\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionCriteria\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionSort\"\n          },\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"description\": \"The response media type\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/json\",\n                \"text/csv\"\n              ],\n              \"default\": \"application/json\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of transactions was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Transaction\"\n                  }\n                }\n              },\n              \"text/csv\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Transaction\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$transactions = $client->transactions()->search([\\n    'filter' => 'result:approved',\\n]);\\n\"\n          }\n        ]\n      }\n    },\n    \"/transactions/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Transactions\"\n        ],\n        \"summary\": \"Retrieve a Transaction\",\n        \"description\": \"Retrieve a Transaction with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Transaction was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Transaction\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$transaction = $client->transactions()->load('transactionId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/transactions/{id}/cancel\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Transactions\"\n        ],\n        \"summary\": \"Cancel a pending or suspended transaction\",\n        \"description\": \"Cancel a scheduled transaction. Once handled a transaction cannot be canceled\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Successful cancel the payment\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Transaction\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"try {\\n    $payment = $client->transactions()->cancel('transactionId');\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ]\n      }\n    },\n    \"/transactions/{id}/gateway-logs\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Transactions\"\n        ],\n        \"summary\": \"Retrieve a Transaction Gateway Logs\",\n        \"description\": \"Retrieve Gateway communication Logs for Transaction with specified identifier string\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Logs were retrieved successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/TransactionGatewayLog\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      }\n    },\n    \"/transactions/{id}/lead-source\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Transactions\"\n        ],\n        \"summary\": \"Retrieve a transaction's Lead Source\",\n        \"description\": \"Retrieve a Lead Source of given transaction\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lead Source was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$transaction = $client->transactions()->load('transactionId');\\n$leadSource = $transaction->getLeadSource();\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Transactions\"\n        ],\n        \"summary\": \"Create a Lead Source for a transaction\",\n        \"description\": \"Create a Lead Source for a transaction\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Lead Source was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Lead Source was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/LeadSource\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$leadSourceForm = new Rebilly\\\\Entities\\\\LeadSource();\\n$leadSourceForm->setSource('TestSource');\\n$leadSourceForm->setCampaign('TestCampaign');\\n\\ntry {\\n    $transaction = $client->transactions()->updateLeadSource('transactionId', $leadSourceForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/LeadSource\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Transactions\"\n        ],\n        \"summary\": \"Delete a Lead Source for a transaction\",\n        \"description\": \"Delete a Lead Source that belongs to a certain transaction\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Lead Source was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Lead Source cannot be deleted\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$payment = $client->transactions()->deleteLeadSource('transactionId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/transactions/{id}/refund\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Transactions\"\n        ],\n        \"summary\": \"Refund a Transaction\",\n        \"description\": \"Refund a Transaction with specified identifier string.\\nNote that the refund will be in the same currency as the original transaction.\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Transaction was refunded successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Transaction\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$transaction = $client->transactions()->refund('transactionId', 1.99);\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/TransactionRefund\"\n              }\n            }\n          },\n          \"description\": \"Transaction resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/users\": {\n      \"get\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Retrieve a list of users\",\n        \"description\": \"Retrieve a list of users\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of users was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/User\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$users = $client->users()->search([\\n    'filter' => 'firstName:John',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Create an user\",\n        \"description\": \"Create an user\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"User was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$userForm = new Rebilly\\\\Entities\\\\User();\\n$userForm->setFirstName('John');\\n$userForm->setLastName('Doe');\\n$userForm->setEmail('johndoe@test.com');\\n\\ntry {\\n    $user = $client->users()->create($userForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/User\"\n        }\n      }\n    },\n    \"/users/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Retrieve user\",\n        \"description\": \"Retrieve user with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"User was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$user = $client->users()->load('userId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Create or update user with predefined ID\",\n        \"description\": \"Create or update user with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"User was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"User was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$userForm = new Rebilly\\\\Entities\\\\User();\\n$userForm->setFirstName('John');\\n$userForm->setLastName('Doe');\\n$userForm->setEmail('johndoe@test.com');\\n\\ntry {\\n    $user = $client->users()->update('userId', $userForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/User\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"Delete user with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"User was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"$ref\": \"#/components/responses/Conflict\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"try {\\n    $client->users()->delete('userId');\\n} catch (ServerException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ]\n      }\n    },\n    \"/users/{id}/password\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Updates user's password with the specified newPassword\",\n        \"description\": \"Updates user's password with the specified newPassword. And checks if currentPassword matches the actual one.\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Password updated successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"$ref\": \"#/components/responses/InvalidDataError\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$updatePasswordForm = new Rebilly\\\\Entities\\\\UpdatePassword();\\n$updatePasswordForm->setCurrentPassword('1234');\\n$updatePasswordForm->setNewPassword('5678');\\n\\ntry {\\n    $user = $client->users()->updatePassword('userId', $updatePasswordForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/UpdatePassword\"\n        }\n      }\n    },\n    \"/users/{id}/totp-reset\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Reset (renew) totpSecret\",\n        \"description\": \"Reset (renew) totpSecret\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"totpSecret reset (renewed) successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$user = $client->users()->resetTotp('userId');\\n\"\n          }\n        ]\n      }\n    },\n    \"/users/reset-password/{token}\": {\n      \"parameters\": [\n        {\n          \"name\": \"token\",\n          \"in\": \"path\",\n          \"description\": \"The token string\",\n          \"required\": true,\n          \"schema\": {\n            \"type\": \"string\"\n          }\n        }\n      ],\n      \"post\": {\n        \"tags\": [\n          \"Users\"\n        ],\n        \"summary\": \"Reset user password\",\n        \"description\": \"Reset user password\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Password was reset successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\"\n                }\n              }\n            }\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$resetPasswordForm = new Rebilly\\\\Entities\\\\ResetPassword();\\n$resetPasswordForm->setNewPassword('1234');\\n\\ntry {\\n    $user = $client->users()->resetPassword('userId', 'token', $resetPasswordForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/ResetPassword\"\n              }\n            }\n          },\n          \"description\": \"ResetPassword resource\",\n          \"required\": true\n        }\n      }\n    },\n    \"/webhooks\": {\n      \"get\": {\n        \"tags\": [\n          \"Webhooks\"\n        ],\n        \"summary\": \"Retrieve a list of webhooks\",\n        \"description\": \"Retrieve a list of webhooks\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Webhooks was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/GlobalWebhook\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        }\n      },\n      \"post\": {\n        \"tags\": [\n          \"Webhooks\"\n        ],\n        \"summary\": \"Create a webhook\",\n        \"description\": \"Create a webhook\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Webhook was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GlobalWebhook\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/GlobalWebhook\"\n        }\n      }\n    },\n    \"/webhooks/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Webhooks\"\n        ],\n        \"summary\": \"Retrieve a webhook\",\n        \"description\": \"Retrieve a webhook with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Webhook was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GlobalWebhook\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"Webhooks\"\n        ],\n        \"summary\": \"Create or update a webhook with predefined ID\",\n        \"description\": \"Create or update a webhook with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Webhook was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GlobalWebhook\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Webhook was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/GlobalWebhook\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/GlobalWebhook\"\n        }\n      }\n    },\n    \"/websites\": {\n      \"get\": {\n        \"tags\": [\n          \"Websites\"\n        ],\n        \"summary\": \"Retrieve a list of websites\",\n        \"description\": \"Retrieve a list of websites\\n\",\n        \"parameters\": [\n          {\n            \"$ref\": \"#/components/parameters/collectionLimit\"\n          },\n          {\n            \"$ref\": \"#/components/parameters/collectionOffset\"\n          },\n          {\n            \"name\": \"Accept\",\n            \"in\": \"header\",\n            \"description\": \"The response media type\",\n            \"schema\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"application/json\",\n                \"text/csv\"\n              ],\n              \"default\": \"application/json\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"A list of Websites was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"Pagination-Total\": {\n                \"description\": \"Total items count\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Limit\": {\n                \"description\": \"Items per page limit\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Pagination-Offset\": {\n                \"description\": \"Pagination offset\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Website\"\n                  }\n                }\n              },\n              \"text/csv\": {\n                \"schema\": {\n                  \"type\": \"array\",\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Website\"\n                  }\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$websites = $client->websites()->search([\\n    'filter' => 'name:TestWebsite',\\n]);\\n\"\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"Websites\"\n        ],\n        \"summary\": \"Create a website\",\n        \"description\": \"Create a website\\n\",\n        \"responses\": {\n          \"201\": {\n            \"description\": \"Website was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Website\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$websiteForm = new Rebilly\\\\Entities\\\\Website();\\n$websiteForm->setName('TestWebsite');\\n$websiteForm->setUrl('http://testwebsite.com');\\n$websiteForm->setServicePhone('+0123456789');\\n$websiteForm->setServiceEmail('test@testwebsite.com');\\n\\ntry {\\n    $website = $client->websites()->create($websiteForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Website\"\n        }\n      }\n    },\n    \"/websites/{id}\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Websites\"\n        ],\n        \"summary\": \"Retrieve a website\",\n        \"description\": \"Retrieve a website with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Website was retrieved successfully\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Website\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$website = $client->websites()->load('websiteId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Websites\"\n        ],\n        \"summary\": \"Create or update a website with predefined ID\",\n        \"description\": \"Create or update a website with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Website was updated\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Website\"\n                }\n              }\n            }\n          },\n          \"201\": {\n            \"description\": \"Website was created\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Website\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$websiteForm = new Rebilly\\\\Entities\\\\Website();\\n$websiteForm->setName('TestWebsite');\\n$websiteForm->setUrl('http://testwebsite.com');\\n$websiteForm->setServicePhone('+0123456789');\\n$websiteForm->setServiceEmail('test@testwebsite.com');\\n\\ntry {\\n    $website = $client->websites()->update('websiteId', $websiteForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Website\"\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Websites\"\n        ],\n        \"summary\": \"Delete a website\",\n        \"description\": \"Delete a website with predefined identifier string\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Website was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"409\": {\n            \"description\": \"Website has related resources and cannot be deleted\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"try {\\n    $client->websites()->delete('websiteId');\\n} catch (ServerException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ]\n      }\n    },\n    \"/websites/{id}/webhook\": {\n      \"parameters\": [\n        {\n          \"$ref\": \"#/components/parameters/resourceId\"\n        }\n      ],\n      \"get\": {\n        \"tags\": [\n          \"Websites\"\n        ],\n        \"summary\": \"Retrieve a webhook for website\",\n        \"description\": \"Retrieve a webhook for website with specified identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Webhook was retrieved successfully\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/WebsiteWebhook\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$websiteWebhook = $client->websiteWebhook()->load('websiteId');\\n\"\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"Websites\"\n        ],\n        \"summary\": \"Create or update a webhook for website with predefined ID\",\n        \"description\": \"Create or update a webhook for website with predefined identifier string\\n\",\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Webhook was updated\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/WebsiteWebhook\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          },\n          \"422\": {\n            \"description\": \"Invalid data was sent\",\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/InvalidError\"\n                }\n              }\n            }\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$websiteWebhookForm = new Rebilly\\\\Entities\\\\WebsiteWebhook();\\n$websiteWebhookForm->setWebHookUrl('http://testwebsite.com/webhook');\\n$websiteWebhookForm->setWebHookUsername('test');\\n$websiteWebhookForm->setWebHookPassword('1234');\\n\\ntry {\\n    $website = $client->websiteWebhook()->update('websiteId', $websiteWebhookForm);\\n} catch (UnprocessableEntityException $e) {\\n    echo $e->getMessage();\\n}\\n\"\n          }\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/WebsiteWebhook\"\n              }\n            }\n          },\n          \"description\": \"Webhook resource\",\n          \"required\": true\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"Websites\"\n        ],\n        \"summary\": \"Delete a webhook\",\n        \"description\": \"Delete a webhook that belongs to a website with predefined ID\\n\",\n        \"responses\": {\n          \"204\": {\n            \"description\": \"Webhook was deleted\",\n            \"headers\": {\n              \"Rate-Limit-Limit\": {\n                \"description\": \"The number of allowed requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Remaining\": {\n                \"description\": \"The number of remaining requests in the current period\",\n                \"schema\": {\n                  \"type\": \"integer\"\n                }\n              },\n              \"Rate-Limit-Reset\": {\n                \"description\": \"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\\nwhen the current period will reset\\n\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          },\n          \"401\": {\n            \"$ref\": \"#/components/responses/AccessForbidden\"\n          },\n          \"404\": {\n            \"$ref\": \"#/components/responses/NotFound\"\n          }\n        },\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"source\": \"$client->websiteWebhook()->delete('websiteId');\\n\"\n          }\n        ]\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"ApiKey\": {\n        \"type\": \"object\",\n        \"description\": \"API secret Key.\",\n        \"properties\": {\n          \"id\": {\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"description\": {\n            \"description\": \"API key description\",\n            \"type\": \"string\"\n          },\n          \"datetimeFormat\": {\n            \"description\": \"Date time format\",\n            \"type\": \"string\",\n            \"default\": \"iso8601\",\n            \"enum\": [\n              \"mysql\",\n              \"iso8601\"\n            ]\n          },\n          \"apiUser\": {\n            \"description\": \"API user name\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"secretKey\": {\n            \"description\": \"API secret key's value\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"createdTime\": {\n            \"description\": \"The API key created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"Attachment\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"fileId\",\n          \"relatedId\",\n          \"relatedType\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"fileId\": {\n            \"description\": \"Linked File object id\",\n            \"type\": \"string\"\n          },\n          \"relatedType\": {\n            \"description\": \"Linked object type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"customer\",\n              \"dispute\",\n              \"invoice\",\n              \"note\",\n              \"payment\",\n              \"plan\",\n              \"product\",\n              \"subscription\",\n              \"transaction\"\n            ]\n          },\n          \"relatedId\": {\n            \"description\": \"Linked object Id\",\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"description\": \"The Original Attachment name\",\n            \"type\": \"string\"\n          },\n          \"description\": {\n            \"description\": \"The Attachment description\",\n            \"type\": \"string\"\n          },\n          \"createdTime\": {\n            \"description\": \"Creation date/time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Latest update date/time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 3,\n            \"maxItems\": 3,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/FileLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/AttachmentResourceLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"AuthenticationOptions\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"passwordPattern\": {\n            \"description\": \"Allowed password pattern\",\n            \"type\": \"string\"\n          },\n          \"credentialTtl\": {\n            \"description\": \"The default lifetime of the credential in seconds\",\n            \"type\": \"integer\"\n          },\n          \"authTokenTtl\": {\n            \"description\": \"The default lifetime of the auth-token in seconds\",\n            \"type\": \"integer\"\n          },\n          \"resetTokenTtl\": {\n            \"description\": \"The default lifetime of the reset-token in seconds\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"AuthenticationToken\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"username\",\n          \"password\"\n        ],\n        \"properties\": {\n          \"token\": {\n            \"description\": \"The token identifier string\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"username\": {\n            \"description\": \"The token's username\",\n            \"type\": \"string\"\n          },\n          \"password\": {\n            \"description\": \"The token's password (write-only)\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          },\n          \"credentialId\": {\n            \"description\": \"The credential's ID\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"The token's customer ID\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"expiredTime\": {\n            \"description\": \"Token's expired time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"BankAccount\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The bank account identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"The Customer's ID.\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"bankName\": {\n            \"description\": \"Bank's name.\",\n            \"type\": \"string\"\n          },\n          \"routingNumber\": {\n            \"description\": \"Bank's Routing Number. Required if bank account is not created from Token. This field is write-only\",\n            \"type\": \"string\"\n          },\n          \"accountNumber\": {\n            \"description\": \"Bank's Account Number. Required if bank account is not created from Token. This field is write-only\",\n            \"type\": \"string\"\n          },\n          \"accountType\": {\n            \"description\": \"Banks's Account type. Required if bank account is not created from Token\",\n            \"type\": \"string\"\n          },\n          \"token\": {\n            \"description\": \"Bank Account Token. Use without any other fields\",\n            \"type\": \"string\"\n          },\n          \"address\": {\n            \"description\": \"The Address. Required if bank account is not created from Token\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"status\": {\n            \"description\": \"Bank Account status\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"active\",\n              \"deactivated\"\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"Bank Account created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Bank Account updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 3,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/ContactLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"Blacklist\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"type\",\n          \"value\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The blacklist identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"type\": {\n            \"description\": \"The blacklist type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"payment-card-id\",\n              \"customer-id\",\n              \"email\",\n              \"ip-address\",\n              \"country\",\n              \"fingerprint\",\n              \"bin\"\n            ]\n          },\n          \"value\": {\n            \"description\": \"The blacklist value\",\n            \"type\": \"string\"\n          },\n          \"expiredTime\": {\n            \"description\": \"The blacklist expired time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"createdTime\": {\n            \"description\": \"The blacklist created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"The blacklist updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"CheckoutPage\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\",\n          \"planId\",\n          \"websiteId\",\n          \"uriPath\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"Checkout page identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"planId\": {\n            \"description\": \"Checkout page plan ID\",\n            \"type\": \"string\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"websiteId\": {\n            \"description\": \"Checkout page website ID\",\n            \"type\": \"string\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"uriPath\": {\n            \"description\": \"Your own custom uri path for this Checkout Page. It will be appended to checkout url https://checkout.rebilly.com/website/\",\n            \"type\": \"string\"\n          },\n          \"name\": {\n            \"description\": \"Checkout page name\",\n            \"type\": \"string\"\n          },\n          \"isActive\": {\n            \"description\": \"If checkout page active\",\n            \"type\": \"boolean\"\n          },\n          \"redirectUrl\": {\n            \"description\": \"Checkout page url\",\n            \"type\": \"string\"\n          },\n          \"redirectTimeout\": {\n            \"description\": \"Checkout page redirect timeout\",\n            \"type\": \"integer\"\n          },\n          \"allowCustomCustomerId\": {\n            \"description\": \"If to enable your own customer ID in requests\",\n            \"type\": \"boolean\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"none\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/AmountAdjustment\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/SmtpAuthorization\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/WebhookAuthorization\"\n          }\n        ]\n      },\n      \"Contact\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The contact identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"The contact customer ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"firstName\": {\n            \"description\": \"The contact first name\",\n            \"type\": \"string\"\n          },\n          \"lastName\": {\n            \"description\": \"The contact last name\",\n            \"type\": \"string\"\n          },\n          \"organization\": {\n            \"description\": \"The contact organization\",\n            \"type\": \"string\"\n          },\n          \"address\": {\n            \"description\": \"The contact street address\",\n            \"type\": \"string\",\n            \"maxLength\": 60\n          },\n          \"address2\": {\n            \"description\": \"The contact street address (second line)\",\n            \"type\": \"string\",\n            \"maxLength\": 60\n          },\n          \"city\": {\n            \"description\": \"The contact city\",\n            \"type\": \"string\",\n            \"maxLength\": 45\n          },\n          \"region\": {\n            \"description\": \"The contact region (state)\",\n            \"type\": \"string\",\n            \"maxLength\": 45\n          },\n          \"country\": {\n            \"description\": \"The contact country ISO Alpha-2 code\",\n            \"type\": \"string\",\n            \"pattern\": \"^[A-Z]{2}$\"\n          },\n          \"postalCode\": {\n            \"description\": \"The contact postal code\",\n            \"type\": \"string\",\n            \"maxLength\": 10\n          },\n          \"phoneNumbers\": {\n            \"$ref\": \"#/components/schemas/ContactPhoneNumbers\"\n          },\n          \"emails\": {\n            \"$ref\": \"#/components/schemas/ContactEmails\"\n          },\n          \"isOutdated\": {\n            \"description\": \"Is contact outdated\",\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"createdTime\": {\n            \"description\": \"The contact created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"The contact updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 2,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"ContactEmails\": {\n        \"description\": \"The contact emails\",\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"object\",\n          \"required\": [\n            \"label\",\n            \"value\"\n          ],\n          \"properties\": {\n            \"label\": {\n              \"description\": \"The email label\",\n              \"type\": \"string\"\n            },\n            \"value\": {\n              \"description\": \"The email value\",\n              \"type\": \"string\"\n            },\n            \"primary\": {\n              \"description\": \"True if email is primary\",\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      },\n      \"ContactObject\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"firstName\": {\n            \"description\": \"The contact first name\",\n            \"type\": \"string\"\n          },\n          \"lastName\": {\n            \"description\": \"The contact last name\",\n            \"type\": \"string\"\n          },\n          \"organization\": {\n            \"description\": \"The contact organization\",\n            \"type\": \"string\"\n          },\n          \"address\": {\n            \"description\": \"The contact street address\",\n            \"type\": \"string\",\n            \"maxLength\": 60\n          },\n          \"address2\": {\n            \"description\": \"The contact street address (second line)\",\n            \"type\": \"string\",\n            \"maxLength\": 60\n          },\n          \"city\": {\n            \"description\": \"The contact city\",\n            \"type\": \"string\",\n            \"maxLength\": 45\n          },\n          \"region\": {\n            \"description\": \"The contact region (state)\",\n            \"type\": \"string\",\n            \"maxLength\": 45\n          },\n          \"country\": {\n            \"description\": \"The contact country ISO Alpha-2 code\",\n            \"type\": \"string\",\n            \"pattern\": \"^[A-Z]{2}$\"\n          },\n          \"postalCode\": {\n            \"description\": \"The contact postal code\",\n            \"type\": \"string\",\n            \"maxLength\": 10\n          },\n          \"phoneNumbers\": {\n            \"$ref\": \"#/components/schemas/ContactPhoneNumbers\"\n          },\n          \"emails\": {\n            \"$ref\": \"#/components/schemas/ContactEmails\"\n          }\n        }\n      },\n      \"ContactPhoneNumbers\": {\n        \"description\": \"The contact phone numbers\",\n        \"type\": \"array\",\n        \"items\": {\n          \"type\": \"object\",\n          \"required\": [\n            \"label\",\n            \"value\"\n          ],\n          \"properties\": {\n            \"label\": {\n              \"description\": \"The phone label\",\n              \"type\": \"string\"\n            },\n            \"value\": {\n              \"description\": \"The phone value\",\n              \"type\": \"string\"\n            },\n            \"primary\": {\n              \"description\": \"True if phone is primary\",\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      },\n      \"Coupon\": {\n        \"type\": \"object\",\n        \"description\": \"Coupons and Discounts\",\n        \"required\": [\n          \"discount\",\n          \"issuedTime\"\n        ],\n        \"properties\": {\n          \"redemptionCode\": {\n            \"description\": \"Coupon's redemption code\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"discount\": {\n            \"$ref\": \"#/components/schemas/Discount\"\n          },\n          \"restrictions\": {\n            \"description\": \"Coupon restrictions\",\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/CouponRestriction\"\n            }\n          },\n          \"redemptionsCount\": {\n            \"type\": \"integer\",\n            \"description\": \"Coupon's redemptions count\",\n            \"minimum\": 0,\n            \"readOnly\": true\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"If coupon enabled\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"issued\",\n              \"expired\"\n            ]\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"Your coupon description. When it is not empty this is used for invoice discount item description,\\notherwise the item's description uses coupon's redemptionCode like 'Coupon \\\"redemptionCode\\\"'\\n\"\n          },\n          \"issuedTime\": {\n            \"description\": \"Coupon's issued time (start time)\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"expiredTime\": {\n            \"description\": \"Coupon's expire time (end time)\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"createdTime\": {\n            \"description\": \"Coupon created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Coupon updated time.\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"CouponExpiration\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"expiredTime\"\n        ],\n        \"properties\": {\n          \"expiredTime\": {\n            \"description\": \"The coupon's expiry time, must be greater than the issued time. Null or empty string will immediately expire the coupon.\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          }\n        }\n      },\n      \"CouponRedemption\": {\n        \"type\": \"object\",\n        \"description\": \"Coupons redemption log\",\n        \"properties\": {\n          \"id\": {\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"redemptionCode\": {\n            \"description\": \"Coupon's redemption code\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"Customer's ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"additionalRestrictions\": {\n            \"description\": \"Additional restrictions for coupon's redemptions\",\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/RedemptionRestriction\"\n            }\n          },\n          \"redeemedTime\": {\n            \"description\": \"Coupon redeem time\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"canceledTime\": {\n            \"description\": \"Coupon redemption canceled time\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"CouponRestriction\": {\n        \"description\": \"Coupon restrictions\",\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"type\": {\n                \"description\": \"Coupon's restriction type\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"discounts-per-redemption\",\n                  \"redemptions-per-customer\",\n                  \"restrict-to-invoices\",\n                  \"restrict-to-plans\",\n                  \"restrict-to-subscriptions\",\n                  \"minimum-order-amount\",\n                  \"total-redemptions\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Discount\": {\n        \"type\": \"object\",\n        \"discriminator\": {\n          \"propertyName\": \"type\"\n        },\n        \"properties\": {\n          \"type\": {\n            \"description\": \"Discount type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"fixed\",\n              \"percent\"\n            ]\n          }\n        }\n      },\n      \"discounts-per-redemption\": {\n        \"description\": \"discounts-per-redemption restrictions\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"quantity\"\n            ],\n            \"properties\": {\n              \"quantity\": {\n                \"type\": \"integer\",\n                \"description\": \"Restriction quantity\"\n              }\n            }\n          }\n        ]\n      },\n      \"fixed\": {\n        \"description\": \"Coupon fixed amount discount\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Discount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"amount\",\n              \"currency\"\n            ],\n            \"properties\": {\n              \"amount\": {\n                \"description\": \"Discount amount\",\n                \"type\": \"number\",\n                \"format\": \"double\"\n              },\n              \"currency\": {\n                \"description\": \"Discount currency\",\n                \"type\": \"string\"\n              }\n            }\n          }\n        ]\n      },\n      \"GenericRestriction\": {\n        \"description\": \"All restriction\",\n        \"type\": \"object\",\n        \"discriminator\": {\n          \"propertyName\": \"type\"\n        },\n        \"properties\": {\n          \"type\": {\n            \"description\": \"Restriction type\",\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"InvoiceDiscount\": {\n        \"type\": \"object\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"redemptionCode\": {\n            \"description\": \"Coupon's redemption code\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"redemptionId\": {\n            \"description\": \"Redemption ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"amount\": {\n            \"description\": \"Total amount that was discounted by this Coupon\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"Discount description\"\n          }\n        }\n      },\n      \"minimum-order-amount\": {\n        \"description\": \"minimum-order-amount restrictions\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"amount\",\n              \"currency\"\n            ],\n            \"properties\": {\n              \"amount\": {\n                \"type\": \"integer\",\n                \"description\": \"Minimum order quantity\"\n              },\n              \"currency\": {\n                \"type\": \"string\",\n                \"description\": \"Minimum order currency\"\n              }\n            }\n          }\n        ]\n      },\n      \"percent\": {\n        \"description\": \"Coupon percent discount\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Discount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"value\"\n            ],\n            \"properties\": {\n              \"value\": {\n                \"description\": \"Discount percent\",\n                \"type\": \"number\",\n                \"format\": \"double\"\n              }\n            }\n          }\n        ]\n      },\n      \"RedemptionRestriction\": {\n        \"description\": \"Redemption restrictions\",\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"type\": {\n                \"description\": \"Redemption's additional restriction type\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"discounts-per-redemption\",\n                  \"restrict-to-invoices\",\n                  \"restrict-to-plans\",\n                  \"restrict-to-subscriptions\",\n                  \"minimum-order-amount\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"redemptions-per-customer\": {\n        \"description\": \"Quantity per Customer restrictions\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"quantity\"\n            ],\n            \"properties\": {\n              \"quantity\": {\n                \"type\": \"integer\",\n                \"description\": \"Restriction value\"\n              }\n            }\n          }\n        ]\n      },\n      \"restrict-to-invoices\": {\n        \"description\": \"restrict-to-invoices restrictions\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"invoiceIds\"\n            ],\n            \"properties\": {\n              \"invoiceIds\": {\n                \"type\": \"array\",\n                \"description\": \"Invoice IDs coupon can be applied to\",\n                \"items\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        ]\n      },\n      \"restrict-to-plans\": {\n        \"description\": \"restrict-to-plans restrictions\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"planIds\"\n            ],\n            \"properties\": {\n              \"planIds\": {\n                \"type\": \"array\",\n                \"description\": \"Plan IDs coupon can be applied to\",\n                \"items\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        ]\n      },\n      \"restrict-to-subscriptions\": {\n        \"description\": \"restrict-to-subscriptions restrictions\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"subscriptionIds\"\n            ],\n            \"properties\": {\n              \"subscriptionIds\": {\n                \"type\": \"array\",\n                \"description\": \"Subscription IDs coupon can be applied to\",\n                \"items\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        ]\n      },\n      \"total-redemptions\": {\n        \"description\": \"total-redemptions restrictions\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GenericRestriction\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"quantity\"\n            ],\n            \"properties\": {\n              \"quantity\": {\n                \"type\": \"integer\",\n                \"description\": \"Total redemptions quantity\"\n              }\n            }\n          }\n        ]\n      },\n      \"Credential\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"username\",\n          \"password\",\n          \"customerId\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The credential identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"username\": {\n            \"description\": \"Credential's username\",\n            \"type\": \"string\"\n          },\n          \"password\": {\n            \"description\": \"The credential's password\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          },\n          \"customerId\": {\n            \"description\": \"The credential's customer ID\",\n            \"type\": \"string\"\n          },\n          \"expiredTime\": {\n            \"description\": \"The credential's expired time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 2,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"Condition\": {\n        \"type\": \"object\",\n        \"discriminator\": {\n          \"propertyName\": \"op\"\n        },\n        \"properties\": {\n          \"op\": {\n            \"type\": \"string\",\n            \"description\": \"The condition operation\",\n            \"enum\": [\n              \"and\",\n              \"or\",\n              \"not\",\n              \"between\",\n              \"equals\",\n              \"in\",\n              \"gt\",\n              \"gte\",\n              \"lt\",\n              \"lte\"\n            ]\n          }\n        },\n        \"required\": [\n          \"op\"\n        ]\n      },\n      \"and\": {\n        \"type\": \"object\",\n        \"description\": \"Logical AND\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/logical\"\n          }\n        ]\n      },\n      \"between\": {\n        \"type\": \"object\",\n        \"description\": \"Between condition\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"path\": {\n                \"type\": \"string\"\n              },\n              \"min\": {\n                \"type\": \"string\"\n              },\n              \"max\": {\n                \"type\": \"string\"\n              }\n            },\n            \"required\": [\n              \"path\",\n              \"min\",\n              \"max\"\n            ]\n          }\n        ]\n      },\n      \"compare\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"path\": {\n            \"type\": \"string\"\n          },\n          \"value\": {\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"path\",\n          \"value\"\n        ]\n      },\n      \"equals\": {\n        \"type\": \"object\",\n        \"description\": \"Equals condition\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/compare\"\n          }\n        ]\n      },\n      \"gt\": {\n        \"type\": \"object\",\n        \"description\": \"Greater than condition\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/compare\"\n          }\n        ]\n      },\n      \"gte\": {\n        \"type\": \"object\",\n        \"description\": \"Greater than or equals condition\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/compare\"\n          }\n        ]\n      },\n      \"in\": {\n        \"type\": \"object\",\n        \"description\": \"In condition\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"path\": {\n                \"type\": \"string\"\n              },\n              \"values\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"string\"\n                }\n              }\n            },\n            \"required\": [\n              \"path\",\n              \"values\"\n            ]\n          }\n        ]\n      },\n      \"logical-not\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"condition\": {\n            \"$ref\": \"#/components/schemas/Condition\"\n          }\n        },\n        \"required\": [\n          \"condition\"\n        ],\n        \"example\": {\n          \"operation\": \"not\",\n          \"condition\": {\n            \"operation\": \"equals\",\n            \"path\": \"/name\",\n            \"value\": \"John Dou\"\n          }\n        }\n      },\n      \"logical\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"conditions\": {\n            \"type\": \"array\",\n            \"minItems\": 2,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Condition\"\n            }\n          }\n        },\n        \"required\": [\n          \"conditions\"\n        ]\n      },\n      \"lt\": {\n        \"type\": \"object\",\n        \"description\": \"Less than condition\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/compare\"\n          }\n        ]\n      },\n      \"lte\": {\n        \"type\": \"object\",\n        \"description\": \"Less than or equals condition\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/compare\"\n          }\n        ]\n      },\n      \"not\": {\n        \"type\": \"object\",\n        \"description\": \"Logical NOT\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/logical-not\"\n          }\n        ]\n      },\n      \"or\": {\n        \"type\": \"object\",\n        \"description\": \"Logical OR\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/logical\"\n          }\n        ]\n      },\n      \"Customer\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The customer identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"defaultPaymentInstrument\": {\n            \"$ref\": \"#/components/schemas/PaymentInstrument\"\n          },\n          \"createdTime\": {\n            \"description\": \"The customer created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"The customer updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"primaryAddress\": {\n            \"$ref\": \"#/components/schemas/ContactObject\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 3,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/NotesLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/DefaultPaymentInstrumentLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/LeadSourceLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"CustomEvent\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The custom event identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"eventType\": {\n            \"type\": \"string\",\n            \"description\": \"The system event type\",\n            \"enum\": [\n              \"subscription-ended\",\n              \"subscription-trial-ended\",\n              \"subscription-renewed\",\n              \"payment-card-expired\",\n              \"invoice-past-due\",\n              \"invoice-issued\",\n              \"invoice-voided\",\n              \"invoice-paid\",\n              \"invoice-abandoned\"\n            ]\n          },\n          \"title\": {\n            \"type\": \"string\",\n            \"description\": \"The custom event title\"\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"The custom event description\"\n          },\n          \"chronology\": {\n            \"type\": \"string\",\n            \"description\": \"The emitting time of the custom event relatively to the system event\",\n            \"enum\": [\n              \"before\",\n              \"after\"\n            ]\n          },\n          \"scheduleInstruction\": {\n            \"$ref\": \"#/components/schemas/CustomEventScheduleInstruction\"\n          },\n          \"createdTime\": {\n            \"$ref\": \"#/components/schemas/ServerTimestamp\"\n          },\n          \"rulesCount\": {\n            \"type\": \"integer\",\n            \"readOnly\": true\n          }\n        },\n        \"required\": [\n          \"eventType\",\n          \"title\",\n          \"chronology\",\n          \"scheduleInstruction\"\n        ]\n      },\n      \"CustomField\": {\n        \"description\": \"A separate Custom Field schema\",\n        \"type\": \"object\",\n        \"required\": [\n          \"name\",\n          \"type\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"description\": \"The name of the custom field\",\n            \"type\": \"string\"\n          },\n          \"type\": {\n            \"description\": \"Type value    | Description\\n------------- | -------------\\narray         | An array of strings up to 255 characters, maximum size is 1000 elements\\nboolean       | true or false\\ndate          | String of format \\\"full-date\\\" (YYYY-MM-DD) from RFC-3339 (full-date)\\ndatetime      | String of format \\\"date-time\\\" (YYYY-MM-DDTHH:MM:SSZ) from RFC-3339 (date-time)\\ninteger       | Cardinal value of -2^31..2^31-1\\nnumber        | Float value. It can take cardinal values also which are interpreted as float\\nstring        | Regular string up to 255 characters\\nmonetary      | A map of 3-letters currency code and amount, e.g. {\\\"currency\\\": \\\"EUR\\\", \\\"amount\\\": 25.30}\\n\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"array\",\n              \"boolean\",\n              \"datetime\",\n              \"integer\",\n              \"number\",\n              \"string\",\n              \"monetary\"\n            ]\n          },\n          \"description\": {\n            \"description\": \"The custom field description\",\n            \"type\": \"string\"\n          },\n          \"isUsed\": {\n            \"description\": \"A flag to represent that the custom field is used on a record of the resource.\",\n            \"type\": \"boolean\"\n          },\n          \"additionalSchema\": {\n            \"description\": \"Additional parameters which can be added according to type:\\nParameter Name | Types         | Description\\n-------------- | ------------- | -------------\\nallowedValues  | string, array | List of allowed values\\n\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"Dispute\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"currency\",\n          \"transactionId\",\n          \"postedTime\",\n          \"type\",\n          \"status\",\n          \"reasonCode\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The dispute identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"The dispute's customer ID\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"transactionId\": {\n            \"description\": \"The dispute's transaction ID\",\n            \"type\": \"string\"\n          },\n          \"currency\": {\n            \"description\": \"The dispute currency ISO Alpha code\",\n            \"type\": \"string\"\n          },\n          \"amount\": {\n            \"description\": \"The dispute amount\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"acquirerReferenceNumber\": {\n            \"description\": \"The dispute's acquirer reference number\",\n            \"type\": \"string\"\n          },\n          \"reasonCode\": {\n            \"description\": \"The dispute's reason code\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"1000\",\n              \"12\",\n              \"2\",\n              \"30\",\n              \"31\",\n              \"35\",\n              \"37\",\n              \"40\",\n              \"41\",\n              \"42\",\n              \"46\",\n              \"47\",\n              \"49\",\n              \"50\",\n              \"53\",\n              \"54\",\n              \"55\",\n              \"57\",\n              \"59\",\n              \"60\",\n              \"62\",\n              \"7\",\n              \"70\",\n              \"71\",\n              \"72\",\n              \"73\",\n              \"74\",\n              \"75\",\n              \"76\",\n              \"77\",\n              \"79\",\n              \"8\",\n              \"80\",\n              \"81\",\n              \"82\",\n              \"83\",\n              \"85\",\n              \"86\",\n              \"93\",\n              \"00\",\n              \"63\",\n              \"A01\",\n              \"A02\",\n              \"A08\",\n              \"F10\",\n              \"F14\",\n              \"F22\",\n              \"F24\",\n              \"F29\",\n              \"C02\",\n              \"C04\",\n              \"C05\",\n              \"C08\",\n              \"C14\",\n              \"C18\",\n              \"C28\",\n              \"C31\",\n              \"C32\",\n              \"M10\",\n              \"M49\",\n              \"P01\",\n              \"P03\",\n              \"P04\",\n              \"P05\",\n              \"P07\",\n              \"P08\",\n              \"P22\",\n              \"P23\",\n              \"R03\",\n              \"R13\",\n              \"M01\",\n              \"FR1\",\n              \"FR4\",\n              \"FR6\",\n              \"AL\",\n              \"AP\",\n              \"AW\",\n              \"CA\",\n              \"CD\",\n              \"CR\",\n              \"DA\",\n              \"DP\",\n              \"DP1\",\n              \"EX\",\n              \"IC\",\n              \"IN\",\n              \"IS\",\n              \"LP\",\n              \"N\",\n              \"NA\",\n              \"NC\",\n              \"P\",\n              \"RG\",\n              \"RM\",\n              \"RN1\",\n              \"RN2\",\n              \"SV\",\n              \"TF\",\n              \"TNM\",\n              \"UA01\",\n              \"UA02\",\n              \"UA32\",\n              \"UA99\",\n              \"UA03\",\n              \"UA10\",\n              \"UA11\",\n              \"UA12\",\n              \"UA18\",\n              \"UA20\",\n              \"UA21\",\n              \"UA22\",\n              \"UA23\",\n              \"UA28\",\n              \"UA30\",\n              \"UA31\",\n              \"UA38\",\n              \"duplicate\",\n              \"fraudulent\",\n              \"subscription_canceled\",\n              \"product_unacceptable\",\n              \"product_not_received\",\n              \"unrecognized\",\n              \"credit_not_processed\",\n              \"customer_initiated\",\n              \"incorrect_account_details\",\n              \"insufficient_funds\",\n              \"bank_cannot_process\",\n              \"debit_not_authorized\",\n              \"general\"\n            ]\n          },\n          \"category\": {\n            \"description\": \"The dispute's category\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"fraud\",\n              \"unrecognized\",\n              \"product-not-received\",\n              \"product-unacceptable\",\n              \"product-not-refunded\",\n              \"duplicate\",\n              \"subscription-canceled\",\n              \"uncategorized\"\n            ]\n          },\n          \"type\": {\n            \"description\": \"The dispute's type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"information-request\",\n              \"first-chargeback\",\n              \"second-chargeback\",\n              \"arbitration\"\n            ]\n          },\n          \"status\": {\n            \"description\": \"The dispute's status\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"response-needed\",\n              \"under-review\",\n              \"forfeited\",\n              \"won\",\n              \"lost\",\n              \"unknown\"\n            ]\n          },\n          \"postedTime\": {\n            \"description\": \"Dispute posted time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"deadlineTime\": {\n            \"description\": \"Dispute deadline time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"rawResponse\": {\n            \"description\": \"Dispute raw response from gateway\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"resolvedTime\": {\n            \"description\": \"Dispute resolved time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"Dispute created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Dispute updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"DisputeEvidence\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"policy\": {\n            \"description\": \"The id of a file upload with the policy materials (may include the cancellation policy, refund policy, and terms of use).\",\n            \"type\": \"string\"\n          },\n          \"accessLogs\": {\n            \"description\": \"The id of a file upload with the access logs showing the customer activity.\",\n            \"type\": \"string\"\n          },\n          \"customerCommunication\": {\n            \"description\": \"The id of a file upload showing communication with the customer (for example emails).\",\n            \"type\": \"string\"\n          },\n          \"customerSignature\": {\n            \"description\": \"The id of a file upload showing the signed contract or signed delivery receipt.\",\n            \"type\": \"string\"\n          },\n          \"deliveryProof\": {\n            \"description\": \"The id of a file upload showing the proof of delivery.\",\n            \"type\": \"string\"\n          },\n          \"explanation\": {\n            \"description\": \"An explanation relevant to the category of dispute.\",\n            \"type\": \"string\"\n          },\n          \"additionalFile\": {\n            \"description\": \"Any additional evidence as a file upload id.\",\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Email\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"email\"\n        ],\n        \"properties\": {\n          \"email\": {\n            \"description\": \"Email\",\n            \"type\": \"string\",\n            \"format\": \"email\"\n          }\n        }\n      },\n      \"SmtpAuthorization\": {\n        \"type\": \"object\",\n        \"discriminator\": {\n          \"propertyName\": \"type\"\n        },\n        \"properties\": {\n          \"type\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"none\",\n              \"plain\",\n              \"login\",\n              \"cram-md5\"\n            ],\n            \"default\": \"none\"\n          }\n        }\n      },\n      \"cram-md5\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/SmtpAuthorization\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/UserPasswordAuthorization\"\n          }\n        ]\n      },\n      \"login\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/SmtpAuthorization\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/UserPasswordAuthorization\"\n          }\n        ]\n      },\n      \"plain\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/SmtpAuthorization\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/UserPasswordAuthorization\"\n          }\n        ]\n      },\n      \"SmtpCredential\": {\n        \"type\": \"object\",\n        \"description\": \"SMTP Credential\",\n        \"required\": [\n          \"host\"\n        ],\n        \"properties\": {\n          \"hash\": {\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"host\": {\n            \"type\": \"string\",\n            \"description\": \"The host name\"\n          },\n          \"port\": {\n            \"type\": \"integer\",\n            \"description\": \"The port value\",\n            \"minimum\": 1,\n            \"maximum\": 65535,\n            \"default\": 25\n          },\n          \"encryption\": {\n            \"type\": \"string\",\n            \"description\": \"The encryption value\",\n            \"enum\": [\n              \"none\",\n              \"tls\",\n              \"ssl\"\n            ],\n            \"default\": \"none\"\n          },\n          \"auth\": {\n            \"$ref\": \"#/components/schemas/SmtpAuthorization\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"UserPasswordAuthorization\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"username\": {\n            \"type\": \"string\"\n          },\n          \"password\": {\n            \"type\": \"string\",\n            \"format\": \"password\"\n          }\n        },\n        \"required\": [\n          \"username\",\n          \"password\"\n        ]\n      },\n      \"Error\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"status\": {\n            \"type\": \"integer\",\n            \"minimum\": 100,\n            \"maximum\": 600\n          },\n          \"error\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"SystemEvent\": {\n        \"type\": \"object\",\n        \"description\": \"The application event\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"eventType\": {\n            \"$ref\": \"#/components/schemas/EventType\"\n          },\n          \"title\": {\n            \"type\": \"string\"\n          },\n          \"description\": {\n            \"type\": \"string\"\n          },\n          \"rulesCount\": {\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"EventType\": {\n        \"type\": \"string\",\n        \"description\": \"Rebilly event type\",\n        \"readOnly\": true,\n        \"enum\": [\n          \"dispute-created\",\n          \"gateway-account-requested\",\n          \"transaction-processed\",\n          \"subscription-canceled\",\n          \"subscription-created\",\n          \"subscription-renewed\",\n          \"payment-card-expired\",\n          \"payment-declined\",\n          \"transaction-process-requested\",\n          \"risk-score-changed\"\n        ]\n      },\n      \"File\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"Original File name\",\n            \"type\": \"string\"\n          },\n          \"extension\": {\n            \"description\": \"The File extension\",\n            \"type\": \"string\"\n          },\n          \"description\": {\n            \"description\": \"The File description\",\n            \"type\": \"string\"\n          },\n          \"url\": {\n            \"description\": \"Write-only. If defined on POST, this would be used as a file source.\",\n            \"type\": \"string\"\n          },\n          \"tags\": {\n            \"description\": \"The tags list\",\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"mime\": {\n            \"description\": \"The mime type\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"image/png\",\n              \"image/jpeg\",\n              \"image/gif\",\n              \"application/pdf\",\n              \"audio/mpeg\"\n            ]\n          },\n          \"size\": {\n            \"description\": \"The File size in bytes\",\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"width\": {\n            \"description\": \"Image width, applicable to images only\",\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"height\": {\n            \"description\": \"Image height, applicable to images only\",\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"sha1\": {\n            \"description\": \"Hash sum of the file\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"createdTime\": {\n            \"description\": \"The upload date/time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"The latest update date/time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 2,\n            \"maxItems\": 2,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/PermalinkLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"GatewayAccount\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"gatewayName\",\n          \"acquirerName\",\n          \"merchantCategoryCode\",\n          \"websites\",\n          \"acceptedCurrencies\",\n          \"organizationId\"\n        ],\n        \"discriminator\": {\n          \"propertyName\": \"gatewayName\"\n        },\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The gateway identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"status\": {\n            \"description\": \"The gateway account's status\",\n            \"readOnly\": true,\n            \"type\": \"string\",\n            \"enum\": [\n              \"active\",\n              \"inactive\",\n              \"pending\"\n            ]\n          },\n          \"gatewayName\": {\n            \"$ref\": \"#/components/schemas/GatewayName\"\n          },\n          \"acquirerName\": {\n            \"$ref\": \"#/components/schemas/AcquirerName\"\n          },\n          \"merchantCategoryCode\": {\n            \"description\": \"The gateway account's merchant category code\",\n            \"type\": \"integer\",\n            \"minimum\": 742,\n            \"maximum\": 9950\n          },\n          \"dccMarkup\": {\n            \"description\": \"Dynamic currency conversion markup in basis points\",\n            \"type\": \"integer\",\n            \"minimum\": 1,\n            \"maximum\": 10000\n          },\n          \"descriptor\": {\n            \"description\": \"The gateway account's descriptor\",\n            \"type\": \"string\"\n          },\n          \"cityField\": {\n            \"description\": \"The gateway account's city field (also known as line 2 descriptor)\",\n            \"type\": \"string\"\n          },\n          \"organizationId\": {\n            \"description\": \"Organization ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"websites\": {\n            \"description\": \"Websites IDs\",\n            \"type\": \"array\",\n            \"items\": {\n              \"description\": \"Website ID\",\n              \"allOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/ResourceId\"\n                }\n              ]\n            }\n          },\n          \"excludedDccQuoteCurrencies\": {\n            \"description\": \"Excluded Dynamic Currency Conversion Quote Currencies\",\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"monthlyLimit\": {\n            \"description\": \"Monthly Limit\",\n            \"type\": \"integer\",\n            \"format\": \"double\",\n            \"minimum\": 0\n          },\n          \"threeDSecure\": {\n            \"description\": \"True, if Gateway Account allows 3DSecure\",\n            \"type\": \"boolean\"\n          },\n          \"dynamicDescriptor\": {\n            \"description\": \"True, if Gateway Account allows dynamic descriptor\",\n            \"type\": \"boolean\"\n          },\n          \"acceptedCurrencies\": {\n            \"description\": \"Accepted currencies (array of the currency three letter code)\",\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"method\": {\n            \"$ref\": \"#/components/schemas/Method\"\n          },\n          \"paymentCardSchemes\": {\n            \"description\": \"Accepted payment card brands\",\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"Visa\",\n                \"MasterCard\",\n                \"American Express\",\n                \"Discover\",\n                \"Maestro\",\n                \"Solo\",\n                \"Electron\",\n                \"JCB\",\n                \"Voyager\",\n                \"Diners Club\",\n                \"Switch\",\n                \"Laser\",\n                \"China Unionpay\"\n              ]\n            }\n          },\n          \"downtimeStart\": {\n            \"description\": \"Gateway account downtime start\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"downtimeEnd\": {\n            \"description\": \"Gateway account downtime end\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"createdTime\": {\n            \"description\": \"Gateway Account created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Gateway Account updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 2,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/OnBoardingUrlLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"A1Gateway\": {\n        \"description\": \"A1Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"description\": \"A1Gateway credentials object\",\n                \"properties\": {\n                  \"accountId\": {\n                    \"type\": \"string\",\n                    \"description\": \"A1Gateway account ID\"\n                  },\n                  \"password\": {\n                    \"type\": \"string\",\n                    \"description\": \"A1Gateway password\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"accountId\",\n                  \"password\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/A1GatewayMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"AmexVPC\": {\n        \"description\": \"AmexVPC config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"description\": \"AmexVPC credentials object\",\n                \"properties\": {\n                  \"url\": {\n                    \"type\": \"string\",\n                    \"description\": \"Virtual Payment Client URL\"\n                  },\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Merchant ID\"\n                  },\n                  \"accessCode\": {\n                    \"type\": \"string\",\n                    \"description\": \"Access Code\",\n                    \"format\": \"password\"\n                  },\n                  \"user\": {\n                    \"type\": \"string\",\n                    \"description\": \"User (used for refund, void and capture)\"\n                  },\n                  \"password\": {\n                    \"type\": \"string\",\n                    \"description\": \"Password (used for refund, void and capture)\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"url\",\n                  \"merchantId\",\n                  \"accessCode\",\n                  \"user\",\n                  \"password\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"AuthorizeNet\": {\n        \"description\": \"AuthorizeNet Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"apiLoginId\": {\n                    \"type\": \"string\",\n                    \"description\": \"AuthorizeNet Gateway api login ID\"\n                  },\n                  \"transactionKey\": {\n                    \"description\": \"AuthorizeNet Gateway Transaction Key\",\n                    \"type\": \"string\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"apiLoginId\",\n                  \"transactionKey\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Beanstream\": {\n        \"description\": \"Beanstream Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Beanstream Gateway merchant ID\"\n                  },\n                  \"apiPasscode\": {\n                    \"type\": \"string\",\n                    \"description\": \"Beanstream Gateway API Passcode\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantId\",\n                  \"apiPasscode\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"BraintreePayments\": {\n        \"description\": \"BraintreePayments Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"publicKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"BraintreePayments Public Key\"\n                  },\n                  \"privateKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"BraintreePayments Private Key\",\n                    \"format\": \"password\"\n                  },\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"BraintreePayments merchant ID\",\n                    \"format\": \"password\"\n                  },\n                  \"merchantAccountId\": {\n                    \"type\": \"string\",\n                    \"description\": \"BraintreePayments merchant account ID\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"publicKey\",\n                  \"privateKey\",\n                  \"merchantId\",\n                  \"merchantAccountId\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Cashflows\": {\n        \"description\": \"Cashflows Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"authId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Cashflows Gateway auth ID\"\n                  },\n                  \"authPassword\": {\n                    \"type\": \"string\",\n                    \"description\": \"Cashflows Gateway auth password\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"authPassword\",\n                  \"authId\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Cayan\": {\n        \"description\": \"Cayan Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantSiteId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Cayan Gateway merchant site ID\"\n                  },\n                  \"merchantName\": {\n                    \"type\": \"string\",\n                    \"description\": \"Cayan Gateway merchant name\"\n                  },\n                  \"merchantKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Cayan Gateway merchant key\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantSiteId\",\n                  \"merchantName\",\n                  \"merchantKey\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Chase\": {\n        \"description\": \"Chase Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"username\": {\n                    \"type\": \"string\",\n                    \"description\": \"Chase Gateway Net Connect username\"\n                  },\n                  \"password\": {\n                    \"type\": \"string\",\n                    \"description\": \"Chase Gateway Net Connect password\",\n                    \"format\": \"password\"\n                  },\n                  \"coNumber\": {\n                    \"type\": \"string\",\n                    \"description\": \"Chase Gateway CO Number used for delimited file reports\"\n                  },\n                  \"divisionId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Chase Gateway division ID\"\n                  },\n                  \"partialAuth\": {\n                    \"type\": \"boolean\",\n                    \"description\": \"Support for Partial Auths\",\n                    \"default\": false\n                  }\n                },\n                \"required\": [\n                  \"username\",\n                  \"password\",\n                  \"coNumber\",\n                  \"divisionId\",\n                  \"partialAuth\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"ChinaUnionPay\": {\n        \"description\": \"China Union Pay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"accountId\": {\n                    \"type\": \"string\",\n                    \"description\": \"China Union Pay Gateway account ID\"\n                  },\n                  \"partyId\": {\n                    \"type\": \"string\",\n                    \"description\": \"China Union Pay Gateway party ID\"\n                  },\n                  \"goods\": {\n                    \"type\": \"string\",\n                    \"description\": \"China Union Pay Gateway goods\"\n                  },\n                  \"md5key\": {\n                    \"type\": \"string\",\n                    \"description\": \"China Union Pay Gateway md5key\",\n                    \"format\": \"password\"\n                  },\n                  \"mobilePay\": {\n                    \"type\": \"string\",\n                    \"description\": \"China Union Pay Gateway mobile pay param\"\n                  }\n                },\n                \"required\": [\n                  \"accountId\",\n                  \"partyId\",\n                  \"goods\",\n                  \"md5key\",\n                  \"mobilePay\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Credorax\": {\n        \"description\": \"Credorax Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Credorax Gateway merchant ID\"\n                  },\n                  \"merchantMd5Signature\": {\n                    \"type\": \"string\",\n                    \"description\": \"Credorax Gateway md5 signature\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantId\",\n                  \"merchantMd5Signature\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"DataCash\": {\n        \"description\": \"DataCash Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"client\": {\n                    \"type\": \"string\",\n                    \"description\": \"DataCash Gateway client\"\n                  },\n                  \"password\": {\n                    \"type\": \"string\",\n                    \"description\": \"DataCash Gateway password\",\n                    \"format\": \"password\"\n                  },\n                  \"policy\": {\n                    \"type\": \"integer\",\n                    \"description\": \"Policy\",\n                    \"minimum\": 0,\n                    \"maximum\": 7,\n                    \"default\": 2\n                  },\n                  \"delay\": {\n                    \"type\": \"integer\",\n                    \"description\": \"Auto Capture delay (in hours)\",\n                    \"minimum\": 0,\n                    \"default\": 0\n                  }\n                },\n                \"required\": [\n                  \"client\",\n                  \"password\",\n                  \"policy\",\n                  \"delay\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/DataCashMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"Dengi\": {\n        \"description\": \"Dengi Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"projectId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Dengi Gateway project ID\"\n                  },\n                  \"publicKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Dengi Gateway public key\",\n                    \"format\": \"password\"\n                  },\n                  \"refundKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Dengi Gateway refund key\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"projectId\",\n                  \"publicKey\",\n                  \"refundKey\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"eMerchantPay\": {\n        \"description\": \"eMerchantPay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"clientId\": {\n                    \"type\": \"string\",\n                    \"description\": \"eMerchantPay Gateway client ID\"\n                  },\n                  \"apiKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"eMerchantPay Gateway api key\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"clientId\",\n                  \"apiKey\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/eMerchantPayMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"Flexepin\": {\n        \"description\": \"Flexepin Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"apiKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Flexepin API Key\"\n                  },\n                  \"apiSecret\": {\n                    \"type\": \"string\",\n                    \"description\": \"Flexepin API Secret\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"apiKey\",\n                  \"apiSecret\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Forte\": {\n        \"description\": \"Forte Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"accountId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Forte Gateway account ID\"\n                  },\n                  \"locationId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Forte Gateway location ID\"\n                  },\n                  \"apiAccessId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Forte Gateway api access ID\",\n                    \"format\": \"password\"\n                  },\n                  \"apiSecretKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Forte Gateway api secret key\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"accountId\",\n                  \"locationId\",\n                  \"apiAccessId\",\n                  \"apiSecretKey\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"FundSend\": {\n        \"description\": \"FundSend Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"clientId\": {\n                    \"type\": \"string\",\n                    \"description\": \"FundSend Gateway client ID\"\n                  },\n                  \"secretWord\": {\n                    \"type\": \"string\",\n                    \"description\": \"FundSend Gateway secret word\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"clientId\",\n                  \"secretWord\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"GET\": {\n        \"description\": \"GET Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"accountId\": {\n                    \"type\": \"string\",\n                    \"description\": \"GET Gateway account ID\"\n                  }\n                },\n                \"required\": [\n                  \"accountId\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/GETMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"GlobalCollect\": {\n        \"description\": \"GlobalCollect Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"GlobalCollect Gateway merchant ID\"\n                  },\n                  \"apiKeyId\": {\n                    \"type\": \"string\",\n                    \"description\": \"GlobalCollect Gateway api key ID\"\n                  },\n                  \"apiSecretKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"GlobalCollect Gateway api secret key\",\n                    \"format\": \"password\"\n                  },\n                  \"skipFraudService\": {\n                    \"type\": \"boolean\",\n                    \"description\": \"GlobalCollect skip fraud service\"\n                  }\n                },\n                \"required\": [\n                  \"merchantId\",\n                  \"apiKeyId\",\n                  \"apiSecretKey\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/GlobalCollectMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"GlobalOne\": {\n        \"description\": \"GlobalOne Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"terminalId\": {\n                    \"type\": \"string\",\n                    \"description\": \"GlobalOne Gateway terminal ID\"\n                  },\n                  \"sharedSecret\": {\n                    \"type\": \"string\",\n                    \"description\": \"GlobalOne Gateway shared secret\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"terminalId\",\n                  \"sharedSecret\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Gpaysafe\": {\n        \"description\": \"Gpaysafe Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"apiKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Gpaysafe apiKey\"\n                  }\n                },\n                \"required\": [\n                  \"apiKey\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"iCheque\": {\n        \"description\": \"iCheque Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"clientId\": {\n                    \"type\": \"string\",\n                    \"description\": \"iCheque Gateway client ID\"\n                  },\n                  \"secretWord\": {\n                    \"type\": \"string\",\n                    \"description\": \"iCheque Gateway secret word\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"clientId\",\n                  \"secretWord\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Ilixium\": {\n        \"description\": \"Ilixium Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Ilixium Gateway merchant ID\"\n                  },\n                  \"accountId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Ilixium Gateway account ID\"\n                  },\n                  \"digestPassword\": {\n                    \"type\": \"string\",\n                    \"description\": \"Ilixium Gateway digest password\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantId\",\n                  \"accountId\",\n                  \"digestPassword\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/IlixiumMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"Jeton\": {\n        \"description\": \"Jeton Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"apiKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Jeton apiKey\"\n                  }\n                },\n                \"required\": [\n                  \"apiKey\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"JetPay\": {\n        \"description\": \"JetPay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"TerminalID\": {\n                    \"type\": \"string\",\n                    \"description\": \"JetPay Gateway terminal ID\"\n                  }\n                },\n                \"required\": [\n                  \"TerminalID\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Moneris\": {\n        \"description\": \"Moneris Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"apiToken\": {\n                    \"type\": \"string\",\n                    \"description\": \"Moneris Gateway api token\",\n                    \"format\": \"password\"\n                  },\n                  \"storeId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Moneris Gateway store ID\"\n                  }\n                },\n                \"required\": [\n                  \"storeId\",\n                  \"apiToken\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"NMI\": {\n        \"description\": \"NMI Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"username\": {\n                    \"type\": \"string\",\n                    \"description\": \"NMI Gateway api token\"\n                  },\n                  \"password\": {\n                    \"type\": \"string\",\n                    \"description\": \"NMI Gateway store ID\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"username\",\n                  \"password\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/NMIMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"OchaPay\": {\n        \"description\": \"OchaPay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"apiUsername\": {\n                    \"type\": \"string\",\n                    \"description\": \"OchaPay Gateway username\"\n                  },\n                  \"apiPassword\": {\n                    \"type\": \"string\",\n                    \"description\": \"OchaPay Gateway api password\",\n                    \"format\": \"password\"\n                  },\n                  \"secretWord\": {\n                    \"type\": \"string\",\n                    \"description\": \"OchaPay Gateway secret word\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"apiUsername\",\n                  \"apiPassword\",\n                  \"secretWord\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Optimal\": {\n        \"description\": \"Optimal Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"storeId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Optimal Gateway store ID\"\n                  },\n                  \"storePwd\": {\n                    \"type\": \"string\",\n                    \"description\": \"Optimal Gateway store password\",\n                    \"format\": \"password\"\n                  },\n                  \"accountNum\": {\n                    \"type\": \"string\",\n                    \"description\": \"Optimal Gateway account number\"\n                  }\n                },\n                \"required\": [\n                  \"storeId\",\n                  \"storePwd\",\n                  \"accountNum\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/OptimalMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"PandaGateway\": {\n        \"description\": \"Panda Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantCode\": {\n                    \"type\": \"string\",\n                    \"description\": \"Panda Gateway merchant code\"\n                  },\n                  \"apiCode\": {\n                    \"type\": \"string\",\n                    \"description\": \"Panda Gateway api code\"\n                  },\n                  \"signKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Panda Gateway sign key\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantCode\",\n                  \"apiCode\",\n                  \"signKey\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Payeezy\": {\n        \"description\": \"Payeezy Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Payeezy Merchant ID\"\n                  },\n                  \"merchantToken\": {\n                    \"type\": \"string\",\n                    \"description\": \"Merchant Token\",\n                    \"format\": \"password\"\n                  },\n                  \"apiKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"API Key\"\n                  },\n                  \"apiSecret\": {\n                    \"type\": \"string\",\n                    \"description\": \"API Secret\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantId\",\n                  \"merchantToken\",\n                  \"apiKey\",\n                  \"apiSecret\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Payflow\": {\n        \"description\": \"Payflow config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"description\": \"Payflow credentials object\",\n                \"properties\": {\n                  \"user\": {\n                    \"type\": \"string\",\n                    \"description\": \"If you set up one or more additional users on the account, this value is the ID of the user authorized to process transactions. If, however, you have not set up additional users, USER has the same value as VENDOR\"\n                  },\n                  \"vendor\": {\n                    \"type\": \"string\",\n                    \"description\": \"Your merchant login ID created when you registered for the account.\"\n                  },\n                  \"password\": {\n                    \"type\": \"string\",\n                    \"description\": \"The password you defined while registering for the account.\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"user\",\n                  \"vendor\",\n                  \"password\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"PayPal\": {\n        \"description\": \"PayPal Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantIdInPayPal\": {\n                    \"type\": \"string\",\n                    \"description\": \"PayPal Gateway merchant id\"\n                  },\n                  \"redirectUrl\": {\n                    \"type\": \"string\",\n                    \"description\": \"PayPal Gateway redirect url\",\n                    \"format\": \"url\"\n                  }\n                },\n                \"required\": [\n                  \"merchantIdInPayPal\",\n                  \"redirectUrl\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Payr\": {\n        \"description\": \"Payr Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"clientId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Payr Gateway client ID\"\n                  },\n                  \"secretWord\": {\n                    \"type\": \"string\",\n                    \"description\": \"Payr Gateway secret word\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"clientId\",\n                  \"secretWord\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Payvision\": {\n        \"description\": \"Payvision Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"memberId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Payvision Gateway member id\"\n                  },\n                  \"memberGuid\": {\n                    \"type\": \"string\",\n                    \"description\": \"Payvision Gateway member guid\",\n                    \"format\": \"password\"\n                  },\n                  \"avs\": {\n                    \"type\": \"boolean\",\n                    \"description\": \"Payvision Gateway avs\"\n                  },\n                  \"delay\": {\n                    \"type\": \"integer\",\n                    \"description\": \"Payvision Gateway delay\"\n                  }\n                },\n                \"required\": [\n                  \"memberId\",\n                  \"memberGuid\",\n                  \"avs\",\n                  \"delay\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/PayvisionMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"Plugnpay\": {\n        \"description\": \"Plugnpay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"publisher-name\": {\n                    \"type\": \"string\",\n                    \"description\": \"Plugnpay Gateway member id\"\n                  },\n                  \"publisher-password\": {\n                    \"type\": \"string\",\n                    \"description\": \"Plugnpay Gateway avs\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"publisher-name\",\n                  \"publisher-password\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Realex\": {\n        \"description\": \"Realex Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"Realex Gateway merchant id\"\n                  },\n                  \"secretKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"Realex Gateway secret key\",\n                    \"format\": \"password\"\n                  },\n                  \"rebatePassword\": {\n                    \"type\": \"string\",\n                    \"description\": \"Realex Gateway rebate password\",\n                    \"format\": \"password\"\n                  },\n                  \"account\": {\n                    \"type\": \"string\",\n                    \"description\": \"Realex Gateway account\"\n                  }\n                },\n                \"required\": [\n                  \"merchantId\",\n                  \"secretKey\",\n                  \"rebatePassword\",\n                  \"account\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"RealTime\": {\n        \"description\": \"RealTime Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"clientId\": {\n                    \"type\": \"string\",\n                    \"description\": \"RealTime Gateway client ID\"\n                  },\n                  \"secretWord\": {\n                    \"type\": \"string\",\n                    \"description\": \"RealTime Gateway secret word\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"clientId\",\n                  \"secretWord\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"RebillyProcessor\": {\n        \"description\": \"RebillyProcessor Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/RebillyProcessorMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"Redsys\": {\n        \"description\": \"Redsys Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantCode\": {\n                    \"type\": \"string\",\n                    \"description\": \"Redsys Gateway merchant code\",\n                    \"format\": \"password\"\n                  },\n                  \"secretCode\": {\n                    \"type\": \"string\",\n                    \"description\": \"Redsys Gateway secret code\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantCode\",\n                  \"secretCode\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"RPN\": {\n        \"description\": \"RPN Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"mid\": {\n                    \"type\": \"string\",\n                    \"description\": \"RPN MID\"\n                  },\n                  \"key\": {\n                    \"type\": \"string\",\n                    \"description\": \"RPN Key\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"mid\",\n                  \"key\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Sagepay\": {\n        \"description\": \"Sagepay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"M_ID\": {\n                    \"type\": \"string\",\n                    \"description\": \"Sagepay Gateway merchant ID\"\n                  },\n                  \"M_KEY\": {\n                    \"type\": \"string\",\n                    \"description\": \"Sagepay Gateway merchant key\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"M_ID\",\n                  \"M_KEY\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"SMSVoucher\": {\n        \"description\": \"SMSVoucher Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"AppId\": {\n                    \"type\": \"string\",\n                    \"description\": \"SMSVoucher AppId\"\n                  }\n                },\n                \"required\": [\n                  \"AppId\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Stripe\": {\n        \"description\": \"Stripe Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"redirectUrl\": {\n                    \"type\": \"string\",\n                    \"description\": \"Stripe Gateway redirect url\",\n                    \"format\": \"url\"\n                  }\n                },\n                \"required\": [\n                  \"redirectUrl\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"UPayCard\": {\n        \"description\": \"UPayCard Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"receiver_account\": {\n                    \"type\": \"string\",\n                    \"description\": \"merchant receiver account\"\n                  },\n                  \"key\": {\n                    \"type\": \"string\",\n                    \"description\": \"merchant key\",\n                    \"format\": \"password\"\n                  },\n                  \"secret\": {\n                    \"type\": \"string\",\n                    \"description\": \"merchant secret\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"receiver_account\",\n                  \"key\",\n                  \"secret\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"USAePay\": {\n        \"description\": \"USAePay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"sourceKey\": {\n                    \"type\": \"string\",\n                    \"description\": \"USAePay Gateway source key\",\n                    \"format\": \"password\"\n                  },\n                  \"pin\": {\n                    \"type\": \"string\",\n                    \"description\": \"USAePay Gateway pin\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"sourceKey\",\n                  \"pin\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"VantivLitle\": {\n        \"description\": \"VantivLitle Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"username\": {\n                    \"type\": \"string\",\n                    \"description\": \"VantivLitle Gateway username\"\n                  },\n                  \"password\": {\n                    \"type\": \"string\",\n                    \"description\": \"VantivLitle Gateway password\",\n                    \"format\": \"password\"\n                  },\n                  \"merchantId\": {\n                    \"type\": \"string\",\n                    \"description\": \"VantivLitle Gateway merchant ID\"\n                  }\n                },\n                \"required\": [\n                  \"username\",\n                  \"password\",\n                  \"merchantId\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/VantivLitleMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"vegaaH\": {\n        \"description\": \"vegaaH Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"terminalId\": {\n                    \"type\": \"string\",\n                    \"description\": \"vegaaH Gateway terminal ID\"\n                  },\n                  \"password\": {\n                    \"type\": \"string\",\n                    \"description\": \"vegaaH Gateway password\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"terminalId\",\n                  \"password\"\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"Walpay\": {\n        \"description\": \"Walpay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantName\": {\n                    \"type\": \"string\",\n                    \"description\": \"Walpay Gateway merchant name\"\n                  },\n                  \"merchantPin\": {\n                    \"type\": \"string\",\n                    \"description\": \"Walpay Gateway merchant pin\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantName\",\n                  \"merchantPin\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/WalpayMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"Wirecard\": {\n        \"description\": \"Wirecard Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantUsername\": {\n                    \"type\": \"string\",\n                    \"description\": \"Wirecard Gateway merchant username\"\n                  },\n                  \"merchantPassword\": {\n                    \"type\": \"string\",\n                    \"description\": \"Wirecard Gateway merchant password\",\n                    \"format\": \"password\"\n                  },\n                  \"businessSignature\": {\n                    \"type\": \"string\",\n                    \"description\": \"Wirecard Gateway merchant business case signature\",\n                    \"format\": \"password\"\n                  },\n                  \"delay\": {\n                    \"type\": \"integer\",\n                    \"description\": \"Wirecard Gateway delay\"\n                  }\n                },\n                \"required\": [\n                  \"merchantUsername\",\n                  \"merchantPassword\",\n                  \"businessSignature\",\n                  \"delay\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/WirecardMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"Worldpay\": {\n        \"description\": \"Worldpay Gateway config\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccount\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"gatewayConfig\"\n            ],\n            \"properties\": {\n              \"gatewayConfig\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"merchantCode\": {\n                    \"type\": \"string\",\n                    \"description\": \"Worldpay Gateway merchant code\",\n                    \"format\": \"password\"\n                  },\n                  \"merchantPassword\": {\n                    \"type\": \"string\",\n                    \"description\": \"Worldpay Gateway merchant password\",\n                    \"format\": \"password\"\n                  }\n                },\n                \"required\": [\n                  \"merchantCode\",\n                  \"merchantPassword\"\n                ]\n              },\n              \"mpi\": {\n                \"$ref\": \"#/components/schemas/WorldpayMpis\"\n              }\n            }\n          }\n        ]\n      },\n      \"AcquirerName\": {\n        \"description\": \"Acquirer name\",\n        \"type\": \"string\",\n        \"enum\": [\n          \"Alipay\",\n          \"AIB\",\n          \"B+S\",\n          \"Bank of America\",\n          \"Bank of Moscow\",\n          \"Bank of Rebilly\",\n          \"Bank One\",\n          \"Beanstream\",\n          \"BMO Harris Bank\",\n          \"Borgun\",\n          \"BraintreePayments\",\n          \"Catalunya Caixa\",\n          \"Chase\",\n          \"ChinaUnionPay\",\n          \"CIM\",\n          \"Credorax\",\n          \"Elavon\",\n          \"EMS\",\n          \"Fifth Third Bank\",\n          \"First Data Buypass\",\n          \"First Data Nashville\",\n          \"First Data North\",\n          \"First Data Omaha\",\n          \"Flexepin\",\n          \"Forte\",\n          \"FundSend\",\n          \"GlobalCollect\",\n          \"Global East\",\n          \"Gpaysafe\",\n          \"Heartland\",\n          \"HSBC\",\n          \"iCheque\",\n          \"Ilixium\",\n          \"Jeton\",\n          \"Masapay\",\n          \"Merrick\",\n          \"Mission Valley Bank\",\n          \"Moneris\",\n          \"NATWEST\",\n          \"NMI\",\n          \"OchaPay\",\n          \"Other\",\n          \"Panda Bank\",\n          \"PayPal\",\n          \"Payr\",\n          \"Payvision\",\n          \"Peoples Trust Company\",\n          \"Privatbank\",\n          \"RBC\",\n          \"RBS WorldPay\",\n          \"RealTime\",\n          \"RebillyProcessor\",\n          \"SMSVoucher\",\n          \"State Bank of Mauritius\",\n          \"Stripe\",\n          \"TBI\",\n          \"TrustPay\",\n          \"TSYS\",\n          \"UPayCard\",\n          \"Vantiv\",\n          \"VoicePay\",\n          \"WeChat Pay\",\n          \"Wells Fargo\",\n          \"Wing Hang Bank\",\n          \"Wirecard\",\n          \"WorldPay\"\n        ]\n      },\n      \"GatewayName\": {\n        \"description\": \"The gateway name\",\n        \"type\": \"string\",\n        \"enum\": [\n          \"A1Gateway\",\n          \"AmexVPC\",\n          \"AuthorizeNet\",\n          \"Beanstream\",\n          \"BraintreePayments\",\n          \"Cashflows\",\n          \"Cayan\",\n          \"Chase\",\n          \"ChinaUnionPay\",\n          \"Credorax\",\n          \"DataCash\",\n          \"Dengi\",\n          \"eMerchantPay\",\n          \"Flexepin\",\n          \"FundSend\",\n          \"Forte\",\n          \"GET\",\n          \"GlobalCollect\",\n          \"GlobalOne\",\n          \"Gpaysafe\",\n          \"iCheque\",\n          \"Ilixium\",\n          \"JetPay\",\n          \"Jeton\",\n          \"Moneris\",\n          \"NMI\",\n          \"OchaPay\",\n          \"Optimal\",\n          \"PandaGateway\",\n          \"Payeezy\",\n          \"Payflow\",\n          \"PayPal\",\n          \"Payr\",\n          \"Payvision\",\n          \"Plugnpay\",\n          \"Realex\",\n          \"RealTime\",\n          \"RebillyProcessor\",\n          \"Redsys\",\n          \"RPN\",\n          \"Sagepay\",\n          \"SMSVoucher\",\n          \"Stripe\",\n          \"UPayCard\",\n          \"USAePay\",\n          \"VantivLitle\",\n          \"vegaaH\",\n          \"Walpay\",\n          \"Wirecard\",\n          \"Worldpay\"\n        ]\n      },\n      \"MpiName\": {\n        \"description\": \"The Merchant plug-in Name\",\n        \"type\": \"string\",\n        \"enum\": [\n          \"PayvisionMpi\",\n          \"WirecardMpi\",\n          \"IlixiumMpi\",\n          \"DataCashMpi\",\n          \"OptimalMpi\",\n          \"GlobalCollectMpi\",\n          \"CardinalCommerce\",\n          \"Other\"\n        ]\n      },\n      \"GlobalWebhook\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"method\",\n          \"url\",\n          \"credentialHash\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The webhook identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"eventsFilter\": {\n            \"description\": \"An array of System event type\",\n            \"type\": \"array\",\n            \"default\": [],\n            \"items\": {\n              \"$ref\": \"#/components/schemas/GlobalWebhookEventType\"\n            }\n          },\n          \"status\": {\n            \"$ref\": \"#/components/schemas/OnOff\"\n          },\n          \"method\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"GET\",\n              \"POST\",\n              \"PUT\",\n              \"PATCH\",\n              \"DELETE\"\n            ]\n          },\n          \"url\": {\n            \"description\": \"URL that will be triggered when the given event occurs.\",\n            \"type\": \"string\",\n            \"format\": \"uri\"\n          },\n          \"headers\": {\n            \"type\": \"object\",\n            \"description\": \"Map of elements with header name - header value association\"\n          },\n          \"credentialHash\": {\n            \"type\": \"string\",\n            \"description\": \"Hash from Credentials which is used for authentication by the given URL\"\n          },\n          \"createdTime\": {\n            \"description\": \"List created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"List updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"Links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"GlobalWebhookEventType\": {\n        \"type\": \"string\",\n        \"description\": \"Rebilly webhooks event type\",\n        \"enum\": [\n          \"gateway-account-requested\",\n          \"subscription-trial-ended\",\n          \"subscription-activated\",\n          \"subscription-canceled\",\n          \"subscription-renewed\",\n          \"transaction-processed\",\n          \"payment-card-expired\",\n          \"payment-declined\",\n          \"invoice-modified\",\n          \"invoice-created\",\n          \"dispute-created\",\n          \"suspended-payment-completed\"\n        ]\n      },\n      \"InvalidError\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Error\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"details\": {\n                \"type\": \"array\",\n                \"items\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        ]\n      },\n      \"Invoice\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"customerId\",\n          \"websiteId\",\n          \"currency\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The invoice identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"The customer's ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"websiteId\": {\n            \"description\": \"The website's ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"organizationId\": {\n            \"description\": \"The organization's ID\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"subscriptionId\": {\n            \"description\": \"The related Subscription's ID if available, otherwise null\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"currency\": {\n            \"description\": \"The currency three letter code\",\n            \"type\": \"string\"\n          },\n          \"amount\": {\n            \"description\": \"The Invoice's amount\",\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"shippingAmount\": {\n            \"description\": \"The Invoice's shipping amount\",\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"billingAddress\": {\n            \"description\": \"Invoice's billing address\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"deliveryAddress\": {\n            \"description\": \"Invoice's delivery address\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"notes\": {\n            \"description\": \"Notes for the customer which will display on the invoice\",\n            \"type\": \"string\"\n          },\n          \"items\": {\n            \"type\": \"array\",\n            \"description\": \"Invoice items array\",\n            \"readOnly\": true,\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"taxes\": {\n            \"type\": \"array\",\n            \"description\": \"Taxes applied to this invoice\",\n            \"readOnly\": true,\n            \"items\": {\n              \"allOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/InvoiceTax\"\n                }\n              ]\n            }\n          },\n          \"discounts\": {\n            \"type\": \"array\",\n            \"description\": \"Discounts applied\",\n            \"readOnly\": true,\n            \"items\": {\n              \"allOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/InvoiceDiscount\"\n                }\n              ]\n            }\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"Invoice status.\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"draft\",\n              \"issued\",\n              \"past-due\",\n              \"paid\",\n              \"abandoned\",\n              \"voided\"\n            ]\n          },\n          \"delinquentCollectionPeriod\": {\n            \"type\": \"integer\",\n            \"description\": \"Delinquent Collection Period - difference between paidTime and dueTime in days.\",\n            \"readOnly\": true\n          },\n          \"collectionPeriod\": {\n            \"type\": \"integer\",\n            \"description\": \"Collection Period - difference between paidTime and issuedTime in days.\",\n            \"readOnly\": true\n          },\n          \"abandonedTime\": {\n            \"description\": \"Invoice abandoned time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"voidedTime\": {\n            \"description\": \"Invoice voided time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"paidTime\": {\n            \"description\": \"Invoice paid time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"dueTime\": {\n            \"description\": \"Invoice due time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"issuedTime\": {\n            \"description\": \"Invoice issued time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"Invoice created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 6,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/WebsiteLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/BillingContactLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/DeliveryContactLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/OrganizationLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/LeadSourceLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"InvoiceIssue\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"issuedTime\": {\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          }\n        }\n      },\n      \"InvoiceItem\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"type\",\n          \"unitPrice\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The website identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"type\": {\n            \"description\": \"Invoice item's type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"debit\",\n              \"credit\"\n            ]\n          },\n          \"unitPrice\": {\n            \"description\": \"Invoice item's price\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"quantity\": {\n            \"description\": \"Invoice item's quantity\",\n            \"type\": \"integer\"\n          },\n          \"productId\": {\n            \"description\": \"The product's ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"description\": {\n            \"description\": \"Invoice item's description\",\n            \"type\": \"string\"\n          },\n          \"discountAmount\": {\n            \"description\": \"Invoice item discount amount\",\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"periodStartTime\": {\n            \"description\": \"Start time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"periodEndTime\": {\n            \"description\": \"End time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 2,\n            \"items\": {\n              \"x-tuple\": true,\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/SubscriptionLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"InvoiceTax\": {\n        \"type\": \"object\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"amount\": {\n            \"description\": \"Tax amount\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"Tax description\"\n          }\n        }\n      },\n      \"Layout\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The layout identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"The name of the layout string\",\n            \"type\": \"string\"\n          },\n          \"items\": {\n            \"description\": \"The array of layout items (planId and starred)\",\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/LayoutItem\"\n            }\n          },\n          \"createdTime\": {\n            \"description\": \"Layout created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 2,\n            \"maxItems\": 2,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/ItemsLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"LayoutItem\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"planId\"\n        ],\n        \"properties\": {\n          \"planId\": {\n            \"description\": \"The plan identifier string\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"starred\": {\n            \"description\": \"Boolean if the plan should be starred (special callout presentation)\",\n            \"type\": \"boolean\"\n          },\n          \"order\": {\n            \"description\": \"Item's order in Layout\",\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"LeadSource\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The lead source identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"medium\": {\n            \"description\": \"Lead Source's medium (eg search, display)\",\n            \"type\": \"string\"\n          },\n          \"source\": {\n            \"description\": \"Lead Source's source (eg google, yahoo)\",\n            \"type\": \"string\"\n          },\n          \"campaign\": {\n            \"description\": \"Lead Source's campaign (eg go-big-123)\",\n            \"type\": \"string\"\n          },\n          \"term\": {\n            \"description\": \"Lead Source's term (eg salt shakers)\",\n            \"type\": \"string\"\n          },\n          \"content\": {\n            \"description\": \"Lead Source's content (eg smiley faces)\",\n            \"type\": \"string\"\n          },\n          \"affiliate\": {\n            \"description\": \"Lead Source's affiliate (eg 123, Bob Smith)\",\n            \"type\": \"string\"\n          },\n          \"subAffiliate\": {\n            \"description\": \"Lead Source's sub-affiliate also called a sub-id or click id in some circles (eg 123456)\",\n            \"type\": \"string\"\n          },\n          \"salesAgent\": {\n            \"description\": \"Lead Source's sales agent (eg James Bond)\",\n            \"type\": \"string\"\n          },\n          \"clickId\": {\n            \"description\": \"Lead Source's click id (may come from an ad server)\",\n            \"type\": \"string\"\n          },\n          \"path\": {\n            \"description\": \"Lead Source's path uri (eg www.example.com/some/landing/path)\",\n            \"type\": \"string\"\n          },\n          \"ipAddress\": {\n            \"description\": \"Customer's IP Address\",\n            \"type\": \"string\"\n          },\n          \"currency\": {\n            \"description\": \"Currency (three letter ISO 4217 alpha code) (eg USD, EUR)\",\n            \"type\": \"string\"\n          },\n          \"amount\": {\n            \"description\": \"The amount that the lead cost\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"createdTime\": {\n            \"description\": \"LeadSource created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"LeadSource updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 2,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"ApprovalUrlLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"approvalUrl\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"AttachmentResourceLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"customer\",\n              \"dispute\",\n              \"invoice\",\n              \"note\",\n              \"payment\",\n              \"plan\",\n              \"product\",\n              \"subscription\",\n              \"transaction\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"BankAccountLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"bankAccount\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"BillingContactLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"billingContact\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"CancelUrlLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"cancelUrl\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"ContactLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"contact\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"CustomerLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"customer\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"DefaultPaymentInstrumentLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"defaultPaymentInstrument\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"DeliveryContactLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"deliveryContact\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"DisputeLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"dispute\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"FileLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"file\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"GatewayAccountLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"gatewayAccount\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"ItemsLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"items\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"LeadSourceLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"leadSource\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"NewLink\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"href\": {\n            \"description\": \"The link URL\",\n            \"type\": \"string\"\n          }\n        },\n        \"required\": [\n          \"href\"\n        ]\n      },\n      \"NotesLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"notes\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"OnBoardingUrlLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"onBoardingUrl\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"OrganizationLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"organization\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"ParentTransactionLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"parentTransaction\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"PaymentCardLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"paymentCard\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"PaymentLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"payment\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"PermalinkLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"permalink\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"PlanLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"plan\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"RefundUrlLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"refundUrl\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"RetriedTransactionLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"retriedTransaction\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"RuleSetVersionLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"rules\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"SelfLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"self\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"SubscriptionLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"subscription\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"TransactionLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"transaction\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"WebsiteLink\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/NewLink\"\n          }\n        ],\n        \"properties\": {\n          \"rel\": {\n            \"description\": \"The link type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"website\"\n            ]\n          }\n        },\n        \"required\": [\n          \"rel\"\n        ]\n      },\n      \"List\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\",\n          \"values\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"List ID\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"version\": {\n            \"description\": \"List version\",\n            \"type\": \"integer\",\n            \"readOnly\": true,\n            \"minimum\": 1\n          },\n          \"name\": {\n            \"description\": \"List name\",\n            \"type\": \"string\"\n          },\n          \"values\": {\n            \"description\": \"List values\",\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"createdTime\": {\n            \"description\": \"List created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"List updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"Links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"Method\": {\n        \"type\": \"string\",\n        \"description\": \"The payment method\",\n        \"enum\": [\n          \"ach\",\n          \"cash\",\n          \"payment-card\",\n          \"paypal\",\n          \"Alipay\",\n          \"China UnionPay\",\n          \"Flexepin\",\n          \"Gpaysafe\",\n          \"Jeton\",\n          \"OchaPay\",\n          \"SMSVoucher\",\n          \"UPayCard\",\n          \"WeChat Pay\"\n        ]\n      },\n      \"A1GatewayMpis\": {\n        \"description\": \"A1Gateway Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"Other\"\n            ]\n          }\n        }\n      },\n      \"DataCashMpi\": {\n        \"description\": \"DataCash Integrated\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/DataCashMpis\"\n          }\n        ]\n      },\n      \"DataCashMpis\": {\n        \"description\": \"DataCash Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"DataCashMpi\"\n            ]\n          }\n        }\n      },\n      \"eMerchantPayMpis\": {\n        \"description\": \"eMerchantPay Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"Other\"\n            ]\n          }\n        }\n      },\n      \"GETMpis\": {\n        \"description\": \"GET Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"Other\"\n            ]\n          }\n        }\n      },\n      \"GlobalCollectMpi\": {\n        \"description\": \"GlobalCollect Integrated\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GlobalCollectMpis\"\n          }\n        ]\n      },\n      \"GlobalCollectMpis\": {\n        \"description\": \"GlobalCollect Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"GlobalCollectMpi\"\n            ]\n          }\n        }\n      },\n      \"IlixiumMpi\": {\n        \"description\": \"Ilixium Integrated\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/IlixiumMpis\"\n          }\n        ]\n      },\n      \"IlixiumMpis\": {\n        \"description\": \"IlixiumMpis Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"IlixiumMpi\"\n            ]\n          }\n        }\n      },\n      \"NMIMpis\": {\n        \"description\": \"NMI Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"Other\"\n            ]\n          }\n        }\n      },\n      \"OptimalMpi\": {\n        \"description\": \"Optimal Integrated\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/OptimalMpis\"\n          }\n        ]\n      },\n      \"OptimalMpis\": {\n        \"description\": \"Optimal Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"OptimalMpi\"\n            ]\n          }\n        }\n      },\n      \"Other\": {\n        \"description\": \"Other\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/A1GatewayMpis\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/eMerchantPayMpis\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/GETMpis\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/NMIMpis\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/PayvisionMpis\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/VantivLitleMpis\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/WalpayMpis\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/WorldpayMpis\"\n          }\n        ]\n      },\n      \"CardinalCommerce\": {\n        \"description\": \"CardinalCommerce Mpi Credentials\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/PayvisionMpis\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"merchantId\",\n              \"processorId\",\n              \"transactionPwd\"\n            ],\n            \"properties\": {\n              \"merchantId\": {\n                \"type\": \"string\",\n                \"description\": \"Cardinal MerchantId\"\n              },\n              \"processorId\": {\n                \"type\": \"string\",\n                \"description\": \"Cardinal ProcessorId\"\n              },\n              \"transactionPwd\": {\n                \"type\": \"string\",\n                \"format\": \"password\",\n                \"description\": \"Cardinal TransactionPwd\"\n              }\n            }\n          }\n        ]\n      },\n      \"PayvisionMpi\": {\n        \"description\": \"Payvision Integrated\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/PayvisionMpis\"\n          }\n        ]\n      },\n      \"PayvisionMpis\": {\n        \"description\": \"Payvision Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"PayvisionMpi\",\n              \"CardinalCommerce\",\n              \"Other\"\n            ]\n          }\n        }\n      },\n      \"RebillyProcessorMpi\": {\n        \"description\": \"RebillyProcessor Integrated\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RebillyProcessorMpis\"\n          }\n        ]\n      },\n      \"RebillyProcessorMpis\": {\n        \"description\": \"RebillyProcessorMpis Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"RebillySandboxMpi\"\n            ]\n          }\n        }\n      },\n      \"VantivLitleMpis\": {\n        \"description\": \"VantivLitle Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"Other\"\n            ]\n          }\n        }\n      },\n      \"WalpayMpis\": {\n        \"description\": \"WalpayMpis Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"Other\"\n            ]\n          }\n        }\n      },\n      \"WirecardMpi\": {\n        \"description\": \"Wirecard Integrated\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/WirecardMpis\"\n          }\n        ]\n      },\n      \"WirecardMpis\": {\n        \"description\": \"Wirecard Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"WirecardMpi\"\n            ]\n          }\n        }\n      },\n      \"WorldpayMpis\": {\n        \"description\": \"Worldpay Mpis\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/MpiName\"\n              }\n            ],\n            \"enum\": [\n              \"Other\"\n            ]\n          }\n        }\n      },\n      \"Note\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"content\",\n          \"relatedType\",\n          \"relatedId\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The note identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"createdBy\": {\n            \"description\": \"The note's creator\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"content\": {\n            \"description\": \"The note's name\",\n            \"type\": \"string\"\n          },\n          \"archived\": {\n            \"description\": \"Is the note archived (excluded from List method)\",\n            \"type\": \"boolean\"\n          },\n          \"relatedType\": {\n            \"description\": \"The note's related resource type\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"customer\",\n              \"payment-card\",\n              \"payment-gateway\",\n              \"subscription\",\n              \"transaction\"\n            ]\n          },\n          \"relatedId\": {\n            \"description\": \"The note's related resource ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"Note created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Note updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"archivedTime\": {\n            \"description\": \"Note archived time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"OnOff\": {\n        \"type\": \"string\",\n        \"default\": \"active\",\n        \"enum\": [\n          \"active\",\n          \"inactive\"\n        ]\n      },\n      \"Organization\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\",\n          \"country\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The organization identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"$ref\": \"#/components/schemas/ServerTimestamp\"\n          },\n          \"updatedTime\": {\n            \"description\": \"The organization updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"The organization name\",\n            \"type\": \"string\",\n            \"maxLength\": 60\n          },\n          \"address\": {\n            \"description\": \"The organization street address\",\n            \"type\": \"string\",\n            \"maxLength\": 60\n          },\n          \"address2\": {\n            \"description\": \"The organization street address\",\n            \"type\": \"string\",\n            \"maxLength\": 60\n          },\n          \"city\": {\n            \"description\": \"The organization city\",\n            \"type\": \"string\",\n            \"maxLength\": 45\n          },\n          \"region\": {\n            \"description\": \"The organization region (state)\",\n            \"type\": \"string\",\n            \"maxLength\": 45\n          },\n          \"country\": {\n            \"description\": \"The organization country ISO Alpha-2 code\",\n            \"type\": \"string\",\n            \"pattern\": \"^[A-Z]{2}$\"\n          },\n          \"postalCode\": {\n            \"description\": \"The organization postal code\",\n            \"type\": \"string\",\n            \"maxLength\": 10\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"Payment\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"websiteId\",\n          \"customerId\",\n          \"currency\",\n          \"amount\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The payment identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"websiteId\": {\n            \"description\": \"The website identifier string\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"The customer identifier string\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"currency\": {\n            \"description\": \"The payment currency ISO Alpha code\",\n            \"type\": \"string\"\n          },\n          \"amount\": {\n            \"description\": \"The payment amount\",\n            \"type\": \"integer\",\n            \"format\": \"double\"\n          },\n          \"scheduledTime\": {\n            \"description\": \"The time the payment is scheduled for collection\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"invoiceIds\": {\n            \"description\": \"The array of invoice identifiers\",\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ResourceId\"\n            }\n          },\n          \"description\": {\n            \"description\": \"The payment description\",\n            \"type\": \"string\",\n            \"maxLength\": 255\n          },\n          \"retryInstruction\": {\n            \"$ref\": \"#/components/schemas/PaymentRetry\"\n          },\n          \"retryNumber\": {\n            \"readOnly\": true,\n            \"description\": \"The position in the sequence of retries\",\n            \"type\": \"integer\"\n          },\n          \"retriedPaymentId\": {\n            \"readOnly\": true,\n            \"description\": \"The retried payment ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"paymentInstrument\": {\n            \"$ref\": \"#/components/schemas/PaymentInstrument\"\n          },\n          \"billingAddress\": {\n            \"description\": \"Billing Address\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"createdBy\": {\n            \"description\": \"The process that created this payment\",\n            \"type\": \"string\"\n          },\n          \"updatedBy\": {\n            \"description\": \"The process that updated this payment\",\n            \"type\": \"string\"\n          },\n          \"status\": {\n            \"description\": \"Payment status\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"scheduled\",\n              \"queued\",\n              \"in-progress\",\n              \"incomplete\",\n              \"waiting-gateway\",\n              \"suspended\",\n              \"completed\"\n            ]\n          },\n          \"result\": {\n            \"description\": \"Payment result\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"approved\",\n              \"declined\",\n              \"canceled\",\n              \"unknown\"\n            ]\n          },\n          \"riskMetadata\": {\n            \"description\": \"Risk metadata\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/RiskMetadata\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"Payment created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Payment updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 4,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/WebsiteLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/TransactionLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/ApprovalUrlLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/LeadSourceLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"PaymentCard\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The card identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"The Customer's ID. Required if card is creating not from Token\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"pan\": {\n            \"description\": \"The card PAN (Primary Account Number). Required if card is creating not from Token\",\n            \"type\": \"string\"\n          },\n          \"bin\": {\n            \"description\": \"The card's bin (the PAN's first 6 digits)\",\n            \"type\": \"string\",\n            \"format\": \"bin\",\n            \"readOnly\": true\n          },\n          \"last4\": {\n            \"description\": \"The PAN's last 4 digits\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"expYear\": {\n            \"description\": \"Card's expiry year. Required if card is creating not from Token\",\n            \"type\": \"integer\"\n          },\n          \"expMonth\": {\n            \"description\": \"Card's expiry month. Required if card is creating not from Token\",\n            \"type\": \"integer\"\n          },\n          \"cvv\": {\n            \"description\": \"Card's cvv (card verification value). Required if card is creating not from Token\",\n            \"type\": \"string\"\n          },\n          \"billingAddress\": {\n            \"description\": \"The Billing Address. Required if card is creating not from Token\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"token\": {\n            \"description\": \"PaymentCardToken. Use without any other fields\",\n            \"type\": \"string\"\n          },\n          \"safeHash\": {\n            \"description\": \"The card's hash. Based on bin and last 4 digits of the PAN\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"status\": {\n            \"description\": \"Payment Card status\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"active\",\n              \"expired\",\n              \"inactive\",\n              \"deactivated\",\n              \"pending\"\n            ]\n          },\n          \"brand\": {\n            \"description\": \"Payment Card brand\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"Visa\",\n              \"MasterCard\",\n              \"American Express\",\n              \"Discover\",\n              \"Maestro\",\n              \"Solo\",\n              \"Electron\",\n              \"JCB\",\n              \"Voyager\",\n              \"Diners Club\",\n              \"Switch\",\n              \"Laser\",\n              \"China UnionPay\"\n            ]\n          },\n          \"bankCountry\": {\n            \"description\": \"Payment Card bank country\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"bankName\": {\n            \"description\": \"Payment Card bank name\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"createdTime\": {\n            \"description\": \"Card created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Card updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 3,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/BillingContactLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"PaymentCardMigrationRequest\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"fromGatewayAccountId\",\n          \"toGatewayAccountId\",\n          \"paymentCardIds\"\n        ],\n        \"properties\": {\n          \"fromGatewayAccountId\": {\n            \"description\": \"An ID of Gateway Account cards should be migrated from\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"toGatewayAccountId\": {\n            \"description\": \"An ID of Gateway Account cards should be migrated to\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"paymentCardIds\": {\n            \"type\": \"array\",\n            \"minItems\": 1,\n            \"items\": {\n              \"description\": \"An array of payment card IDs\",\n              \"allOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/ResourceId\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"PaymentCardMigrationResponse\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"migratedCards\": {\n            \"type\": \"integer\",\n            \"description\": \"Amount of cards that were successfully migrated\"\n          }\n        }\n      },\n      \"PaymentInstrument\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"method\"\n        ],\n        \"discriminator\": {\n          \"propertyName\": \"method\"\n        },\n        \"properties\": {\n          \"method\": {\n            \"$ref\": \"#/components/schemas/Method\"\n          }\n        }\n      },\n      \"ach\": {\n        \"description\": \"ACH payment instrument object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/PaymentInstrument\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"bankAccountId\"\n            ],\n            \"properties\": {\n              \"bankAccountId\": {\n                \"description\": \"The bank account identifier string\",\n                \"allOf\": [\n                  {\n                    \"$ref\": \"#/components/schemas/ResourceId\"\n                  }\n                ]\n              },\n              \"gatewayAccountId\": {\n                \"description\": \"The payment gateway identifier string\",\n                \"allOf\": [\n                  {\n                    \"$ref\": \"#/components/schemas/ResourceId\"\n                  }\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"cash\": {\n        \"description\": \"Cash payment instrument object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/PaymentInstrument\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"receivedBy\": {\n                \"description\": \"The receiver's name\",\n                \"type\": \"string\"\n              }\n            }\n          }\n        ]\n      },\n      \"payment-card\": {\n        \"description\": \"Payment card payment instrument object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/PaymentInstrument\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"paymentCardId\"\n            ],\n            \"properties\": {\n              \"paymentCardId\": {\n                \"description\": \"The payment card identifier string\",\n                \"allOf\": [\n                  {\n                    \"$ref\": \"#/components/schemas/ResourceId\"\n                  }\n                ]\n              },\n              \"gatewayAccountId\": {\n                \"description\": \"The payment gateway identifier string\",\n                \"allOf\": [\n                  {\n                    \"$ref\": \"#/components/schemas/ResourceId\"\n                  }\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"paypal\": {\n        \"description\": \"PayPal payment instrument object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/PaymentInstrument\"\n          },\n          {\n            \"type\": \"object\",\n            \"required\": [\n              \"payPalAccountId\"\n            ],\n            \"properties\": {\n              \"payPalAccountId\": {\n                \"description\": \"The PayPal account identifier string\",\n                \"allOf\": [\n                  {\n                    \"$ref\": \"#/components/schemas/ResourceId\"\n                  }\n                ]\n              },\n              \"gatewayAccountId\": {\n                \"description\": \"The payment gateway identifier string\",\n                \"allOf\": [\n                  {\n                    \"$ref\": \"#/components/schemas/ResourceId\"\n                  }\n                ]\n              }\n            }\n          }\n        ]\n      },\n      \"AmountAdjustment\": {\n        \"type\": \"object\",\n        \"discriminator\": {\n          \"propertyName\": \"method\"\n        },\n        \"properties\": {\n          \"method\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"none\",\n              \"partial\",\n              \"discount\"\n            ]\n          }\n        },\n        \"required\": [\n          \"method\"\n        ]\n      },\n      \"PaymentRetry\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"attempts\": {\n            \"type\": \"array\",\n            \"minItems\": 1,\n            \"items\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"scheduleInstruction\": {\n                  \"$ref\": \"#/components/schemas/CommonScheduleInstruction\"\n                },\n                \"paymentInstruction\": {\n                  \"$ref\": \"#/components/schemas/AmountAdjustment\"\n                }\n              },\n              \"required\": [\n                \"scheduleInstruction\",\n                \"paymentInstruction\"\n              ]\n            }\n          },\n          \"afterAttemptPolicy\": {\n            \"description\": \"The policy on the attempt finishes\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"none\",\n              \"change-subscription-renewal-time\"\n            ]\n          },\n          \"afterRetryEndPolicy\": {\n            \"description\": \"The policy on the retry ends\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"none\",\n              \"cancel-subscription\"\n            ]\n          }\n        },\n        \"required\": [\n          \"attempts\",\n          \"afterAttemptPolicy\",\n          \"afterRetryEndPolicy\"\n        ]\n      },\n      \"discount\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/AmountAdjustment\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"value\": {\n                \"description\": \"The payment amount discount\",\n                \"type\": \"number\",\n                \"format\": \"float\"\n              },\n              \"type\": {\n                \"description\": \"The payment amount discount type\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"percent\",\n                  \"fixed\"\n                ]\n              }\n            },\n            \"required\": [\n              \"value\",\n              \"type\"\n            ]\n          }\n        ]\n      },\n      \"partial\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/AmountAdjustment\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"value\": {\n                \"description\": \"The payment amount\",\n                \"type\": \"number\",\n                \"format\": \"float\"\n              },\n              \"type\": {\n                \"description\": \"The payment amount type\",\n                \"type\": \"string\",\n                \"enum\": [\n                  \"percent\",\n                  \"fixed\"\n                ]\n              }\n            },\n            \"required\": [\n              \"value\",\n              \"type\"\n            ]\n          }\n        ]\n      },\n      \"PaymentToken\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"method\",\n          \"paymentInstrument\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The token identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"method\": {\n            \"$ref\": \"#/components/schemas/Method\"\n          },\n          \"paymentInstrument\": {\n            \"$ref\": \"#/components/schemas/PaymentTokenInstrument\"\n          },\n          \"fingerprint\": {\n            \"description\": \"Device fingerprint hash\",\n            \"type\": \"string\"\n          },\n          \"billingAddress\": {\n            \"description\": \"The Address. Required if bank account is not created from Token\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"PaymentTokenInstrument\": {\n        \"type\": \"object\",\n        \"description\": \"Payment Token instrument object\",\n        \"properties\": {\n          \"pan\": {\n            \"description\": \"The card PAN (Primary Account Number)\",\n            \"type\": \"string\"\n          },\n          \"expMonth\": {\n            \"description\": \"Card's expiry month\",\n            \"type\": \"integer\"\n          },\n          \"expYear\": {\n            \"description\": \"Card's expiry year\",\n            \"type\": \"integer\"\n          },\n          \"cvv\": {\n            \"description\": \"The CVV/CVC of the payment card\",\n            \"type\": \"string\"\n          },\n          \"routingNumber\": {\n            \"description\": \"Routing Number\",\n            \"type\": \"integer\"\n          },\n          \"accountNumber\": {\n            \"description\": \"AccountNumber\",\n            \"type\": \"integer\"\n          },\n          \"accountType\": {\n            \"description\": \"Account Type\",\n            \"type\": \"string\"\n          },\n          \"bankName\": {\n            \"description\": \"Bank name\",\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"PayPalAccount\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The PayPal identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"The Customer's ID.\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"billingAddress\": {\n            \"description\": \"The Customer's Billing Address.\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"username\": {\n            \"description\": \"PayPal username.\",\n            \"type\": \"string\"\n          },\n          \"status\": {\n            \"description\": \"PayPal Account status\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"inactive\",\n              \"active\",\n              \"deactivated\"\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"PayPal Account created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"PayPal Account updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 4,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/ContactLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/ApprovalUrlLink\"\n                }\n              ]\n            }\n          }\n        },\n        \"required\": [\n          \"customerId\",\n          \"billingAddress\"\n        ]\n      },\n      \"Plan\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\",\n          \"currency\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The website identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"The plan name\",\n            \"type\": \"string\"\n          },\n          \"currency\": {\n            \"description\": \"Currency (three letter ISO 4217 code)\",\n            \"type\": \"string\"\n          },\n          \"currencySign\": {\n            \"description\": \"Currency sign\",\n            \"type\": \"string\"\n          },\n          \"isActive\": {\n            \"description\": \"If the plan is not active, customers cannot subscribe to the plan (default to true)\",\n            \"type\": \"boolean\"\n          },\n          \"description\": {\n            \"description\": \"The plan description\",\n            \"type\": \"string\"\n          },\n          \"richDescription\": {\n            \"description\": \"The plan rich description - supports HTML\",\n            \"type\": \"string\"\n          },\n          \"recurringAmount\": {\n            \"description\": \"The amount that recurs according to the schedule\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"recurringPeriodUnit\": {\n            \"description\": \"The unit of time\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"day\",\n              \"week\",\n              \"month\",\n              \"year\"\n            ]\n          },\n          \"recurringPeriodLength\": {\n            \"description\": \"The length of time (used with the recurringPeriodUnit)\",\n            \"type\": \"integer\"\n          },\n          \"trialAmount\": {\n            \"description\": \"The amount of a trial - 0 is a valid value (for free)\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"trialPeriodUnit\": {\n            \"description\": \"The unit of time\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"day\",\n              \"week\",\n              \"month\",\n              \"year\"\n            ]\n          },\n          \"trialPeriodLength\": {\n            \"description\": \"The length of time (used with the trialPeriodUnit)\",\n            \"type\": \"integer\"\n          },\n          \"setupAmount\": {\n            \"description\": \"The amount of a trial - 0 is a valid value (for free)\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"expiredTime\": {\n            \"description\": \"Time when the plan is not longer valid\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"contractTermUnit\": {\n            \"description\": \"The unit of time\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"day\",\n              \"week\",\n              \"month\",\n              \"year\"\n            ]\n          },\n          \"contractTermLength\": {\n            \"description\": \"The length that corresponds with the contractTermUnit\",\n            \"type\": \"integer\"\n          },\n          \"recurringPeriodLimit\": {\n            \"description\": \"The number of times a subscription will rebill until the contract is over\",\n            \"type\": \"integer\"\n          },\n          \"minQuantity\": {\n            \"description\": \"Minimum quantity per order, defaults to 1\",\n            \"type\": \"integer\"\n          },\n          \"maxQuantity\": {\n            \"description\": \"Maximum quantity per order (NULL if no maximum)\",\n            \"type\": \"integer\"\n          },\n          \"createdTime\": {\n            \"description\": \"Plan created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Plan updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"PriceBasedShippingRate\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\",\n          \"currency\",\n          \"price\"\n        ],\n        \"properties\": {\n          \"name\": {\n            \"description\": \"The shipping rate name\",\n            \"type\": \"string\",\n            \"maxLength\": 255\n          },\n          \"minOrderSubtotal\": {\n            \"description\": \"Minimum order subtotal for which this shipping rate is applicable, defaults to 0.00\",\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"default\": 0\n          },\n          \"maxOrderSubtotal\": {\n            \"description\": \"Maximum order subtotal for which this shipping rate is applicable (NULL if no maximum)\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"price\": {\n            \"description\": \"The shipping price - 0 is a valid value (for free)\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"currency\": {\n            \"description\": \"Currency (three letter ISO 4217 code)\",\n            \"type\": \"string\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"Product\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"description\": \"Your product includes digital goods, services, and physical goods.\\nProducts appear on invoice line items. If you set a tax category identifier,\\ntaxes will be calculated upon invoice generation.\\n\",\n        \"example\": \"{\\n  \\\"id\\\": \\\"stringid\\\",\\n  \\\"name\\\": \\\"Widget\\\",\\n  \\\"description\\\": \\\"Fantastic widget\\\",\\n  \\\"taxCategoryId\\\": null,\\n  \\\"requiresShipping\\\": true,\\n  \\\"accountingCode\\\": \\\"100\\\",\\n  \\\"customFields\\\": [],\\n  \\\"createdTime\\\": \\\"2015-08-27 13:45:12\\\",\\n  \\\"updatedTime\\\": \\\"2015-08-27 13:45:12\\\",\\n  \\\"_links\\\": [\\n      {\\n        \\\"rel\\\": \\\"self\\\",\\n        \\\"href\\\": \\\"https://api.rebilly.com/v2.1/products/stringid\\\"\\n      }\\n  ]\\n}\\n\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The product identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"The product name\",\n            \"type\": \"string\",\n            \"maxLength\": 255\n          },\n          \"description\": {\n            \"description\": \"The product description\",\n            \"type\": \"string\",\n            \"maxLength\": 512\n          },\n          \"taxCategoryId\": {\n            \"description\": \"The product's tax category identifier string\",\n            \"type\": \"string\",\n            \"enum\": [\n              99999,\n              20010,\n              40030,\n              51020,\n              51010,\n              31000,\n              30070\n            ]\n          },\n          \"requiresShipping\": {\n            \"description\": \"If the product requires shipping, shipping calculations will be applied\",\n            \"type\": \"boolean\"\n          },\n          \"accountingCode\": {\n            \"description\": \"The product accounting code\",\n            \"type\": \"string\"\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"createdTime\": {\n            \"description\": \"The product created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"The product updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"Profile\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The user identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"email\": {\n            \"description\": \"The user email\",\n            \"readOnly\": true,\n            \"type\": \"string\",\n            \"format\": \"email\",\n            \"maxLength\": 100\n          },\n          \"firstName\": {\n            \"description\": \"User's first name\",\n            \"readOnly\": true,\n            \"type\": \"string\"\n          },\n          \"lastName\": {\n            \"description\": \"User's last name\",\n            \"readOnly\": true,\n            \"type\": \"string\"\n          },\n          \"businessPhone\": {\n            \"description\": \"The user business phone number\",\n            \"readOnly\": true,\n            \"type\": \"string\"\n          },\n          \"mobilePhone\": {\n            \"description\": \"The user mobile phone number\",\n            \"readOnly\": true,\n            \"type\": \"string\"\n          },\n          \"availableCurrencies\": {\n            \"type\": \"array\",\n            \"description\": \"An array of reporting currencies enabled for the merchant\",\n            \"readOnly\": true,\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"reportingCurrency\": {\n            \"description\": \"The user's ISO Alpha-3 code used for reports\",\n            \"type\": \"string\"\n          },\n          \"totpRequired\": {\n            \"description\": \"The user setting of two-factor authentication\",\n            \"readOnly\": true,\n            \"type\": \"boolean\"\n          },\n          \"totpSecret\": {\n            \"description\": \"The user TOTP key for authentication app (if TOTP enabled)\",\n            \"readOnly\": true,\n            \"type\": \"string\"\n          },\n          \"totpUrl\": {\n            \"description\": \"The user link to QR-code for TOTP authentication app (if TOTP enabled)\",\n            \"readOnly\": true,\n            \"type\": \"string\",\n            \"format\": \"url\"\n          },\n          \"country\": {\n            \"description\": \"The user country setting - two letter code\",\n            \"readOnly\": true,\n            \"type\": \"string\"\n          },\n          \"preferences\": {\n            \"description\": \"User preferences like timezone, language and many more. This is an object with custom properties.\",\n            \"type\": \"object\"\n          }\n        }\n      },\n      \"ResetPassword\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"newPassword\"\n        ],\n        \"properties\": {\n          \"newPassword\": {\n            \"description\": \"New password\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          }\n        }\n      },\n      \"ResetPasswordToken\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"username\",\n          \"password\"\n        ],\n        \"properties\": {\n          \"token\": {\n            \"description\": \"The token's identifier string\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"username\": {\n            \"description\": \"The token's username\",\n            \"type\": \"string\"\n          },\n          \"password\": {\n            \"description\": \"Token's password (only for POST)\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          },\n          \"credential\": {\n            \"description\": \"Token's credential ID\",\n            \"type\": \"string\"\n          },\n          \"expiredTime\": {\n            \"description\": \"Password expired time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"ResourceCustomFields\": {\n        \"description\": \"\\\"Custom Fields list as a map `{\\\"custom field name\\\": \\\"custom field value\\\", ...}\\\"`.\\nThe format must follow the saved format (see Custom Fields section for the formats).\\n\",\n        \"type\": \"object\"\n      },\n      \"ResourceId\": {\n        \"type\": \"string\",\n        \"description\": \"The resource ID. Defaults to UUID v4\",\n        \"maxLength\": 50,\n        \"example\": \"4f6cf35x-2c4y-483z-a0a9-158621f77a21\"\n      },\n      \"RiskMetadata\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"ipAddress\": {\n            \"description\": \"The customer's IP\",\n            \"type\": \"string\",\n            \"format\": \"ipv4\"\n          },\n          \"isProxy\": {\n            \"description\": \"True if customer's ip address is related to proxy\",\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"isVpn\": {\n            \"description\": \"True if customer's ip address is related to VPN\",\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"isTor\": {\n            \"description\": \"True if customer's ip address is related to TOR\",\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"isHosting\": {\n            \"description\": \"True if customer's ip address is related to hosting\",\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"vpnServiceName\": {\n            \"description\": \"VPN service name, if available\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"isp\": {\n            \"description\": \"Internet Service Provider name, if available\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"country\": {\n            \"description\": \"Country ISO Alpha-2 code for specified ipAddress\",\n            \"maxLength\": 2,\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"example\": \"US\"\n          },\n          \"city\": {\n            \"description\": \"City for specified ipAddress\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"example\": \"New York\"\n          },\n          \"latitude\": {\n            \"description\": \"Latitude for specified ipAddress\",\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"longitude\": {\n            \"description\": \"Longitude for specified ipAddress\",\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"postalCode\": {\n            \"description\": \"Postal code for specified ipAddress\",\n            \"type\": \"string\",\n            \"maxLength\": 10,\n            \"readOnly\": true\n          },\n          \"timeZone\": {\n            \"description\": \"Time zone for specified ipAddress\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"example\": \"America/New_York\"\n          },\n          \"accuracyRadius\": {\n            \"description\": \"Accuracy radius for specified ipAddress (kilometers)\",\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"fingerprint\": {\n            \"description\": \"The fingerprint\",\n            \"type\": \"string\"\n          },\n          \"httpHeaders\": {\n            \"description\": \"HTTP headers\",\n            \"type\": \"object\",\n            \"additionalProperties\": {\n              \"type\": \"string\"\n            },\n            \"example\": {\n              \"User-Agent\": \"Mozilla/5.0\",\n              \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\"\n            }\n          }\n        }\n      },\n      \"add-risk-score\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          },\n          {\n            \"type\": \"object\",\n            \"description\": \"Add risk score\",\n            \"properties\": {\n              \"score\": {\n                \"type\": \"integer\",\n                \"default\": 0\n              }\n            }\n          }\n        ]\n      },\n      \"blacklist\": {\n        \"description\": \"Add customer data to blacklist\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"type\": {\n                \"type\": \"string\",\n                \"enum\": [\n                  \"customer-id\",\n                  \"email\",\n                  \"fingerprint\",\n                  \"ip-address\",\n                  \"payment-card-id\"\n                ]\n              },\n              \"ttl\": {\n                \"type\": \"integer\",\n                \"description\": \"Blacklist TTL. Defaults to zero, meaning blacklist record won't expire ever.\",\n                \"default\": 0\n              }\n            },\n            \"required\": [\n              \"type\"\n            ]\n          }\n        ]\n      },\n      \"cancel-scheduled-payments\": {\n        \"description\": \"\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          }\n        ]\n      },\n      \"guess-payment-card-expiration\": {\n        \"description\": \"\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          }\n        ]\n      },\n      \"pick-gateway-account\": {\n        \"description\": \"\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"pickInstruction\": {\n                \"$ref\": \"#/components/schemas/GatewayAccountPickInstruction\"\n              }\n            },\n            \"required\": [\n              \"pickInstruction\"\n            ]\n          }\n        ]\n      },\n      \"schedule-payment-retry\": {\n        \"description\": \"\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/PaymentRetry\"\n          }\n        ]\n      },\n      \"schedule-payment\": {\n        \"description\": \"\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          },\n          {\n            \"type\": \"object\",\n            \"description\": \"The calculation instruction of scheduled time for payment\",\n            \"properties\": {\n              \"scheduleInstruction\": {\n                \"$ref\": \"#/components/schemas/CommonScheduleInstruction\"\n              },\n              \"amountPolicy\": {\n                \"type\": \"string\",\n                \"enum\": [\n                  \"balance-outstanding\",\n                  \"invoice-total\"\n                ]\n              }\n            },\n            \"required\": [\n              \"scheduleInstruction\",\n              \"amountPolicy\"\n            ]\n          }\n        ]\n      },\n      \"send-email\": {\n        \"description\": \"\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/EmailNotification\"\n          }\n        ]\n      },\n      \"stop-subscriptions\": {\n        \"description\": \"Stop active subscriptions\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          }\n        ]\n      },\n      \"trigger-webhook\": {\n        \"description\": \"\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/RuleAction\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/Webhook\"\n          }\n        ]\n      },\n      \"SendPreviewWebhook\": {\n        \"description\": \"Trigger a test webhook\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Webhook\"\n          }\n        ]\n      },\n      \"SendTestEmail\": {\n        \"description\": \"Send a test email\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/EmailNotification\"\n          }\n        ]\n      },\n      \"EmailNotification\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"credentialHash\": {\n            \"type\": \"string\",\n            \"description\": \"SMTP Credential identifier string.\"\n          },\n          \"sender\": {\n            \"type\": \"string\",\n            \"description\": \"The sender address. The template palceholders are allowed.\"\n          },\n          \"recipients\": {\n            \"type\": \"array\",\n            \"description\": \"The recipients addresses. The template palceholders are allowed.\",\n            \"minItems\": 1,\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"cc\": {\n            \"type\": \"array\",\n            \"description\": \"The recipients addresses. The template palceholders are allowed.\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"bcc\": {\n            \"type\": \"array\",\n            \"description\": \"The hidden recipients addresses. The template palceholders are allowed.\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"subject\": {\n            \"type\": \"string\",\n            \"description\": \"The message subject. The template palceholders are allowed.\"\n          },\n          \"bodyText\": {\n            \"type\": \"string\",\n            \"description\": \"Leave empty to use text from \\\"bodyHtml\\\" without tags.\\nThe template palceholders are allowed.\\n\"\n          },\n          \"bodyHtml\": {\n            \"type\": \"string\",\n            \"description\": \"Leave empty to receive \\\"text/plain\\\" email.\\nThe template palceholders are allowed.\\n\"\n          }\n        },\n        \"required\": [\n          \"credentialHash\",\n          \"sender\",\n          \"recipients\",\n          \"subject\",\n          \"bodyText\",\n          \"bodyHtml\"\n        ]\n      },\n      \"GatewayAccountPickInstruction\": {\n        \"type\": \"object\",\n        \"discriminator\": {\n          \"propertyName\": \"method\"\n        },\n        \"properties\": {\n          \"method\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"gateway-account-weights\",\n              \"gateway-acquirer-weights\"\n            ]\n          }\n        },\n        \"required\": [\n          \"method\"\n        ]\n      },\n      \"gateway-account-weights\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccountPickInstruction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"weightedList\": {\n                \"type\": \"array\",\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"items\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"gatewayAccountId\": {\n                      \"$ref\": \"#/components/schemas/ResourceId\"\n                    },\n                    \"weight\": {\n                      \"type\": \"integer\"\n                    }\n                  },\n                  \"required\": [\n                    \"gatewayAccountId\",\n                    \"weight\"\n                  ]\n                },\n                \"example\": \"[\\n  {\\\"gatewayAccountId\\\": \\\"my_gateway_account_1\\\", \\\"weight\\\": 80},\\n  {\\\"gatewayAccountId\\\": \\\"my_gateway_account_2\\\", \\\"weight\\\": 20}\\n]\\n\"\n              }\n            },\n            \"required\": [\n              \"weightedList\"\n            ]\n          }\n        ]\n      },\n      \"gateway-acquirer-weights\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/GatewayAccountPickInstruction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"weightedList\": {\n                \"type\": \"array\",\n                \"uniqueItems\": true,\n                \"minimum\": 0,\n                \"items\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"gatewayName\": {\n                      \"$ref\": \"#/components/schemas/GatewayName\"\n                    },\n                    \"acquirerName\": {\n                      \"$ref\": \"#/components/schemas/AcquirerName\"\n                    },\n                    \"weight\": {\n                      \"type\": \"integer\"\n                    }\n                  },\n                  \"required\": [\n                    \"gatewayName\",\n                    \"acquirerName\",\n                    \"weight\"\n                  ]\n                },\n                \"example\": \"[\\n  {\\\"gatewayName\\\": \\\"RebillyProcessor\\\", \\\"acquirerName\\\": \\\"AIB\\\", \\\"weight\\\": 80},\\n  {\\\"gatewayName\\\": \\\"RebillyProcessor\\\", \\\"acquirerName\\\": \\\"B+S\\\", \\\"weight\\\": 20}\\n\"\n              }\n            },\n            \"required\": [\n              \"weightedList\"\n            ]\n          }\n        ]\n      },\n      \"Rule\": {\n        \"type\": \"object\",\n        \"description\": \"The rule\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"status\": {\n            \"$ref\": \"#/components/schemas/OnOff\"\n          },\n          \"final\": {\n            \"description\": \"Whether rule is final, meaning stop further matching rules if this is matched\",\n            \"type\": \"boolean\",\n            \"default\": true\n          },\n          \"criteria\": {\n            \"$ref\": \"#/components/schemas/Condition\"\n          },\n          \"actions\": {\n            \"type\": \"array\",\n            \"uniqueItems\": true,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/RuleAction\"\n            }\n          }\n        },\n        \"required\": [\n          \"name\",\n          \"actions\"\n        ]\n      },\n      \"RuleAction\": {\n        \"type\": \"object\",\n        \"discriminator\": {\n          \"propertyName\": \"name\"\n        },\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\",\n            \"description\": \"The action name\",\n            \"enum\": [\n              \"blacklist\",\n              \"cancel-scheduled-payments\",\n              \"guess-payment-card-expiration\",\n              \"pick-gateway-account\",\n              \"schedule-payment-retry\",\n              \"schedule-payment\",\n              \"send-email\",\n              \"trigger-webhook\",\n              \"stop-subscriptions\",\n              \"add-risk-score\"\n            ]\n          },\n          \"status\": {\n            \"$ref\": \"#/components/schemas/OnOff\"\n          }\n        },\n        \"required\": [\n          \"name\"\n        ]\n      },\n      \"RuleSet\": {\n        \"type\": \"object\",\n        \"description\": \"Set of rules for particular event\",\n        \"properties\": {\n          \"version\": {\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"rules\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Rule\"\n            }\n          },\n          \"updatedTime\": {\n            \"$ref\": \"#/components/schemas/ServerTimestamp\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        },\n        \"required\": [\n          \"rules\"\n        ]\n      },\n      \"RuleSetHistoryItem\": {\n        \"type\": \"object\",\n        \"description\": \"Version of rules\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"version\": {\n            \"type\": \"integer\"\n          },\n          \"createdTime\": {\n            \"$ref\": \"#/components/schemas/ServerTimestamp\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to a resource\",\n            \"readOnly\": true,\n            \"minItems\": 2,\n            \"maxItems\": 2,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/RuleSetVersionLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"RuleSetVersion\": {\n        \"type\": \"object\",\n        \"description\": \"Version of rules\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"version\": {\n            \"type\": \"integer\"\n          },\n          \"rules\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Rule\"\n            }\n          },\n          \"createdTime\": {\n            \"$ref\": \"#/components/schemas/ServerTimestamp\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"Webhook\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"method\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"GET\",\n              \"POST\",\n              \"PUT\",\n              \"PATCH\",\n              \"DELETE\"\n            ]\n          },\n          \"url\": {\n            \"type\": \"string\",\n            \"format\": \"uri\"\n          },\n          \"query\": {\n            \"type\": \"object\",\n            \"description\": \"The URI parameters\",\n            \"additionalProperties\": {\n              \"type\": \"string\",\n              \"example\": {\n                \"param1\": \"value1\",\n                \"param2\": \"value2\"\n              }\n            }\n          },\n          \"body\": {\n            \"type\": \"string\"\n          },\n          \"credentialHash\": {\n            \"type\": \"string\",\n            \"description\": \"Webhook Credential identifier string.\"\n          },\n          \"headers\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/WebhookHeader\"\n            }\n          }\n        },\n        \"required\": [\n          \"method\",\n          \"url\"\n        ]\n      },\n      \"WebhookHeader\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"name\": {\n            \"type\": \"string\"\n          },\n          \"status\": {\n            \"$ref\": \"#/components/schemas/OnOff\"\n          },\n          \"value\": {\n            \"type\": \"string\",\n            \"example\": {\n              \"Header1\": \"value1\",\n              \"Header2\": \"value2;value3\"\n            }\n          }\n        },\n        \"required\": [\n          \"name\",\n          \"value\"\n        ]\n      },\n      \"CommonScheduleInstruction\": {\n        \"type\": \"object\",\n        \"description\": \"The calculation instruction of scheduled time\",\n        \"discriminator\": {\n          \"propertyName\": \"method\"\n        },\n        \"properties\": {\n          \"method\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"auto\",\n              \"immediately\",\n              \"date-interval\",\n              \"day-of-month\",\n              \"day-of-week\"\n            ]\n          }\n        },\n        \"required\": [\n          \"method\"\n        ]\n      },\n      \"CustomEventScheduleInstruction\": {\n        \"type\": \"object\",\n        \"description\": \"The calculation instruction of scheduled time\",\n        \"discriminator\": {\n          \"propertyName\": \"method\"\n        },\n        \"properties\": {\n          \"method\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"date-interval\",\n              \"day-of-month\",\n              \"day-of-week\"\n            ]\n          }\n        },\n        \"required\": [\n          \"method\"\n        ]\n      },\n      \"DayOfWeek\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"Sunday\",\n          \"Monday\",\n          \"Tuesday\",\n          \"Wednesday\",\n          \"Thursday\",\n          \"Friday\",\n          \"Saturday\"\n        ]\n      },\n      \"auto\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/CommonScheduleInstruction\"\n          }\n        ]\n      },\n      \"date-interval\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/CommonScheduleInstruction\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/CustomEventScheduleInstruction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"duration\": {\n                \"type\": \"integer\",\n                \"description\": \"The number of the units\",\n                \"minimum\": 1\n              },\n              \"unit\": {\n                \"$ref\": \"#/components/schemas/TimeUnit\"\n              }\n            },\n            \"required\": [\n              \"duration\",\n              \"unit\"\n            ]\n          }\n        ]\n      },\n      \"day-of-month\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/CommonScheduleInstruction\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/CustomEventScheduleInstruction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"day\": {\n                \"type\": \"integer\",\n                \"minimum\": 1,\n                \"maximum\": 31,\n                \"description\": \"The day of the month when event will be scheduled.\\nBe aware if the month has less days,\\nthe last day of the month will be selected.\\n\"\n              },\n              \"time\": {\n                \"$ref\": \"#/components/schemas/Time\"\n              }\n            },\n            \"required\": [\n              \"day\"\n            ]\n          }\n        ]\n      },\n      \"day-of-week\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/CommonScheduleInstruction\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/CustomEventScheduleInstruction\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"day\": {\n                \"$ref\": \"#/components/schemas/DayOfWeek\"\n              },\n              \"week\": {\n                \"type\": \"string\",\n                \"default\": \"next\",\n                \"enum\": [\n                  \"next\",\n                  \"first-in-month\",\n                  \"last-in-month\"\n                ]\n              },\n              \"time\": {\n                \"$ref\": \"#/components/schemas/Time\"\n              }\n            },\n            \"required\": [\n              \"day\"\n            ]\n          }\n        ]\n      },\n      \"immediately\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/CommonScheduleInstruction\"\n          }\n        ]\n      },\n      \"Time\": {\n        \"type\": \"string\",\n        \"format\": \"date-time\",\n        \"pattern\": \"^([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](Z(\\\\+|\\\\-)([0-9]|0[0-9]|1[0-9]|2[0-3]):[0-5][0-9])?$\"\n      },\n      \"TimeUnit\": {\n        \"type\": \"string\",\n        \"enum\": [\n          \"second\",\n          \"seconds\",\n          \"minute\",\n          \"minutes\",\n          \"hour\",\n          \"hours\",\n          \"day\",\n          \"days\",\n          \"month\",\n          \"months\",\n          \"year\",\n          \"years\"\n        ]\n      },\n      \"ServerTimestamp\": {\n        \"type\": \"string\",\n        \"description\": \"Read-only timestamp, automatically assigned on back-end.\",\n        \"format\": \"date-time\",\n        \"readOnly\": true\n      },\n      \"Session\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"permissions\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The session identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"token\": {\n            \"description\": \"The session's token used for authentication\",\n            \"type\": \"string\"\n          },\n          \"permissions\": {\n            \"description\": \"The session's permissions. See the format in example\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/UserPermissions\"\n              }\n            ]\n          },\n          \"userId\": {\n            \"description\": \"The user identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"Session created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Session updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"expiredTime\": {\n            \"description\": \"Session expired time. Defaults to one hour\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"ShippingZone\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The shipping zone identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"The shipping zone name\",\n            \"type\": \"string\",\n            \"maxLength\": 255\n          },\n          \"countries\": {\n            \"description\": \"Countries covered by the shipping zone. A country can only belong to one shipping zone (no overlapping).\\nThis property can be empty or null to create a default shipping zone for countries that were not specified in other zones.\\n\",\n            \"type\": \"array\",\n            \"items\": {\n              \"description\": \"Country ISO Alpha-2 code\",\n              \"type\": \"string\",\n              \"pattern\": \"^[A-Z]{2}$\"\n            }\n          },\n          \"rates\": {\n            \"description\": \"Price-based shipping rate instructions\",\n            \"type\": \"array\",\n            \"items\": {\n              \"description\": \"Price based shipping rate instruction\",\n              \"allOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/PriceBasedShippingRate\"\n                }\n              ]\n            }\n          },\n          \"isDefault\": {\n            \"description\": \"Is this Shipping Zone default\",\n            \"readOnly\": true\n          },\n          \"createdTime\": {\n            \"description\": \"The shipping zone created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"The shipping zone updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"Signin\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"email\",\n          \"password\"\n        ],\n        \"properties\": {\n          \"email\": {\n            \"description\": \"Email\",\n            \"type\": \"string\"\n          },\n          \"password\": {\n            \"description\": \"Password\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          },\n          \"expiredTime\": {\n            \"description\": \"Session expired time. Defaults to one hour\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          }\n        }\n      },\n      \"Signup\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"email\",\n          \"company\",\n          \"firstName\",\n          \"lastName\",\n          \"businessPhone\",\n          \"password\",\n          \"website\"\n        ],\n        \"properties\": {\n          \"email\": {\n            \"description\": \"The user email\",\n            \"type\": \"string\",\n            \"format\": \"email\",\n            \"maxLength\": 100\n          },\n          \"company\": {\n            \"description\": \"The user's company name\",\n            \"type\": \"string\"\n          },\n          \"firstName\": {\n            \"description\": \"The user first name\",\n            \"type\": \"string\"\n          },\n          \"lastName\": {\n            \"description\": \"The user last name\",\n            \"type\": \"string\"\n          },\n          \"businessPhone\": {\n            \"description\": \"The user business phone number\",\n            \"type\": \"string\"\n          },\n          \"password\": {\n            \"description\": \"The user password\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          },\n          \"website\": {\n            \"description\": \"The user's website address\",\n            \"type\": \"string\"\n          },\n          \"currencies\": {\n            \"description\": \"An array of currencies codes\",\n            \"type\": \"array\",\n            \"default\": [\n              \"USD\"\n            ],\n            \"items\": {\n              \"description\": \"3 letters ISO 4217 currency code\",\n              \"type\": \"string\"\n            }\n          },\n          \"merchantCategoryCode\": {\n            \"description\": \"Merchant category code. Defaults to \\\"Computer Software Stores\\\"\",\n            \"type\": \"integer\",\n            \"default\": 5734\n          }\n        }\n      },\n      \"Status\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"status\": {\n            \"description\": \"The API status. If everything is ok - value is 'ok'\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"ok\"\n            ]\n          },\n          \"time\": {\n            \"description\": \"Current time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          }\n        }\n      },\n      \"Subscription\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"customerId\",\n          \"planId\",\n          \"websiteId\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The Subscription identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"Unique id for each customer\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"planId\": {\n            \"description\": \"Unique id for each plan\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"websiteId\": {\n            \"description\": \"Unique id for each website\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"initialInvoiceId\": {\n            \"description\": \"Unique id for the initial invoice\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"deliveryAddress\": {\n            \"description\": \"Delivery address\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"billingAddress\": {\n            \"description\": \"Billing address\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"status\": {\n            \"description\": \"Subscription status\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"quantity\": {\n            \"description\": \"Quantity for each subscription. Default value to 1\",\n            \"type\": \"integer\"\n          },\n          \"autopay\": {\n            \"description\": \"Autopay determines if a payment attempt will be automatic\",\n            \"type\": \"boolean\",\n            \"default\": true\n          },\n          \"inTrial\": {\n            \"description\": \"True if the subscription is currently in a trial period\",\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"rebillNumber\": {\n            \"description\": \"The current period number\",\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"canceledBy\": {\n            \"description\": \"Canceled by\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"merchant\",\n              \"customer\",\n              \"rebilly\"\n            ]\n          },\n          \"cancelCategory\": {\n            \"description\": \"Cancel category\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"billing-failure\",\n              \"did-not-use\",\n              \"did-not-want\",\n              \"missing-features\",\n              \"bugs-or-problems\",\n              \"do-not-remember\",\n              \"risk-warning\",\n              \"contract-expired\",\n              \"too-expensive\",\n              \"never-started\",\n              \"switched-plan\",\n              \"other\"\n            ]\n          },\n          \"cancelDescription\": {\n            \"description\": \"Cancel reason description in free form\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"maxLength\": 255\n          },\n          \"riskMetadata\": {\n            \"description\": \"Risk metadata\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/RiskMetadata\"\n              }\n            ]\n          },\n          \"startTime\": {\n            \"description\": \"Subscription start time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"activationTime\": {\n            \"description\": \"Subscription activation time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"endTime\": {\n            \"description\": \"Subscription end time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"renewalTime\": {\n            \"description\": \"Subscription renewal time\",\n            \"type\": \"string\",\n            \"format\": \"date-time\"\n          },\n          \"canceledTime\": {\n            \"description\": \"Subscription canceled time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"Subscription created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Subscription updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 6,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/PlanLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/WebsiteLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/BillingContactLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/DeliveryContactLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/LeadSourceLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"SubscriptionCancel\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"policy\",\n          \"canceledBy\",\n          \"cancelCategory\"\n        ],\n        \"properties\": {\n          \"policy\": {\n            \"description\": \"Cancel policy\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"at-next-renewal\",\n              \"now-with-prorata-credit\",\n              \"now\"\n            ]\n          },\n          \"canceledBy\": {\n            \"description\": \"Canceled by\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"merchant\",\n              \"customer\"\n            ]\n          },\n          \"cancelCategory\": {\n            \"description\": \"Cancel category\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"did-not-use\",\n              \"did-not-want\",\n              \"missing-features\",\n              \"bugs-or-problems\",\n              \"do-not-remember\",\n              \"risk-warning\",\n              \"contract-expired\",\n              \"too-expensive\",\n              \"other\"\n            ]\n          },\n          \"cancelDescription\": {\n            \"description\": \"Cancel reason description in free form\",\n            \"type\": \"string\",\n            \"maxLength\": 255\n          }\n        }\n      },\n      \"SubscriptionSwitch\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"planId\",\n          \"policy\"\n        ],\n        \"properties\": {\n          \"planId\": {\n            \"description\": \"The plan identifier string\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"policy\": {\n            \"description\": \"Switch policy\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"at-next-renewal\",\n              \"now-with-prorata-credit\",\n              \"now\"\n            ]\n          },\n          \"websiteId\": {\n            \"description\": \"The website's ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"quantity\": {\n            \"description\": \"Quantity for each subscription. Default value to 1\",\n            \"type\": \"integer\"\n          }\n        }\n      },\n      \"TaxCategory\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The tax category identifier string\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"maxLength\": 50,\n            \"enum\": [\n              99999,\n              20010,\n              40030,\n              51020,\n              51010,\n              31000,\n              30070\n            ]\n          },\n          \"description\": {\n            \"description\": \"The tax category description\",\n            \"type\": \"string\",\n            \"maxLength\": 512\n          },\n          \"taxProvider\": {\n            \"description\": \"The tax category maps to a provider\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"tax-jar\"\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"ThreeDSecure\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"enrolled\",\n          \"enrollmentEci\",\n          \"customerId\",\n          \"gatewayAccountId\",\n          \"paymentCardId\",\n          \"websiteId\",\n          \"currency\",\n          \"amount\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The 3D Secure entry identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"customerId\": {\n            \"description\": \"Related customer ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"gatewayAccountId\": {\n            \"description\": \"Related gateway account ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"paymentCardId\": {\n            \"description\": \"Related payment card ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"websiteId\": {\n            \"description\": \"Related Website ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"enrolled\": {\n            \"description\": \"Is the cardholder enrolled in 3DSecure\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"Y\",\n              \"N\",\n              \"U\"\n            ]\n          },\n          \"enrollmentEci\": {\n            \"description\": \"The 3D Secure entry enrollment eci\",\n            \"type\": \"string\"\n          },\n          \"eci\": {\n            \"description\": \"The 3D Secure entry electronic commerce indicator\",\n            \"type\": \"integer\"\n          },\n          \"cavv\": {\n            \"description\": \"The 3D Secure entry cardholder authentication verification value\",\n            \"type\": \"string\"\n          },\n          \"xid\": {\n            \"description\": \"The 3D Secure entry transaction Id\",\n            \"type\": \"string\"\n          },\n          \"payerAuthResponseStatus\": {\n            \"description\": \"The 3D Secure entry Auth Response Status\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"Y\",\n              \"N\",\n              \"U\",\n              \"A\"\n            ]\n          },\n          \"signatureVerification\": {\n            \"description\": \"If signature was verified\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"Y\",\n              \"N\"\n            ]\n          },\n          \"amount\": {\n            \"description\": \"Transaction amount\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          },\n          \"currency\": {\n            \"description\": \"The currency three letter code\",\n            \"type\": \"string\"\n          },\n          \"createdTime\": {\n            \"description\": \"The 3D Secure entry created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"ApiTracking\": {\n        \"type\": \"object\",\n        \"description\": \"Tracking API Requests.\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"status\": {\n            \"type\": \"integer\",\n            \"description\": \"HTTP response code\"\n          },\n          \"url\": {\n            \"type\": \"string\",\n            \"description\": \"API request address\"\n          },\n          \"method\": {\n            \"type\": \"string\",\n            \"description\": \"HTTP method\",\n            \"enum\": [\n              \"HEAD\",\n              \"GET\",\n              \"POST\",\n              \"PUT\",\n              \"DELETE\",\n              \"PATCH\"\n            ]\n          },\n          \"request\": {\n            \"type\": \"string\",\n            \"description\": \"Request JSON-string\"\n          },\n          \"response\": {\n            \"type\": \"string\",\n            \"description\": \"Response JSON-string\"\n          },\n          \"requestHeaders\": {\n            \"type\": \"object\",\n            \"additionalProperties\": {\n              \"type\": \"string\"\n            },\n            \"example\": {\n              \"User-Agent\": \"Mozilla/5.0\",\n              \"Accept\": \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\"\n            }\n          },\n          \"responseHeaders\": {\n            \"type\": \"object\",\n            \"additionalProperties\": {\n              \"type\": \"string\"\n            },\n            \"example\": {\n              \"Rate-Limit-Limit\": 5000,\n              \"Rate-Limit-Remaining\": 4999,\n              \"Rate-Limit-Reset\": \"Mon, 31 Jul 2017 04:16:00 +0000\"\n            }\n          },\n          \"user\": {\n            \"type\": \"object\",\n            \"description\": \"The user who has made a request\",\n            \"readOnly\": true,\n            \"properties\": {\n              \"userId\": {\n                \"allOf\": [\n                  {\n                    \"$ref\": \"#/components/schemas/ResourceId\"\n                  }\n                ]\n              },\n              \"apiKeyId\": {\n                \"allOf\": [\n                  {\n                    \"$ref\": \"#/components/schemas/ResourceId\"\n                  }\n                ]\n              },\n              \"email\": {\n                \"description\": \"The user email\",\n                \"type\": \"string\",\n                \"format\": \"email\"\n              },\n              \"firstName\": {\n                \"description\": \"The user first name\",\n                \"type\": \"string\"\n              },\n              \"lastName\": {\n                \"description\": \"The user last name\",\n                \"type\": \"string\"\n              },\n              \"ipAddress\": {\n                \"type\": \"string\",\n                \"description\": \"Client IP address\",\n                \"format\": \"ipv4\"\n              },\n              \"userAgent\": {\n                \"description\": \"The software that is acting on behalf of a user\",\n                \"type\": \"string\"\n              },\n              \"fingerprint\": {\n                \"description\": \"The user device fingerprint hash\",\n                \"type\": \"string\"\n              },\n              \"isSupport\": {\n                \"description\": \"If user from support\",\n                \"type\": \"boolean\"\n              }\n            }\n          },\n          \"duration\": {\n            \"type\": \"integer\",\n            \"description\": \"Request duration in milliseconds\"\n          },\n          \"createdTime\": {\n            \"description\": \"The log created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"SubscriptionTracking\": {\n        \"type\": \"object\",\n        \"description\": \"Tracking subscription log\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"subscriptionId\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"invoiceItemId\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"result\": {\n            \"type\": \"string\",\n            \"description\": \"Subscription's result\",\n            \"enum\": [\n              \"created\",\n              \"postponed\",\n              \"stopped\",\n              \"error\"\n            ]\n          },\n          \"message\": {\n            \"type\": \"string\",\n            \"description\": \"It contains the transaction number and renewal time\"\n          },\n          \"createdTime\": {\n            \"description\": \"The log created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"WebhookTracking\": {\n        \"type\": \"object\",\n        \"description\": \"Webhook Tracking Requests.\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"eventType\": {\n            \"$ref\": \"#/components/schemas/EventType\"\n          },\n          \"url\": {\n            \"type\": \"string\",\n            \"description\": \"Url where webhook was sent\"\n          },\n          \"method\": {\n            \"type\": \"string\",\n            \"description\": \"HTTP method which was used to send webhook\",\n            \"example\": \"POST\"\n          },\n          \"headers\": {\n            \"type\": \"object\",\n            \"description\": \"HTTP headers which were used to send webhook\",\n            \"additionalProperties\": {\n              \"type\": \"string\"\n            },\n            \"example\": {\n              \"My-Header\": \"Cool-Value\"\n            }\n          },\n          \"responseCode\": {\n            \"type\": \"integer\",\n            \"description\": \"HTTP code response\"\n          },\n          \"responseBody\": {\n            \"type\": \"string\",\n            \"description\": \"Response body received\"\n          },\n          \"payload\": {\n            \"type\": \"object\",\n            \"description\": \"Event's data information\"\n          },\n          \"sentTime\": {\n            \"description\": \"Sent time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"initiatedTime\": {\n            \"description\": \"Initiated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"The log created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"WebsiteWebhookTracking\": {\n        \"type\": \"object\",\n        \"description\": \"Webhook Tracking Requests.\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"websiteId\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"eventName\": {\n            \"type\": \"string\",\n            \"description\": \"Event name for which webhook was called\"\n          },\n          \"status\": {\n            \"type\": \"string\",\n            \"description\": \"Event's status\",\n            \"enum\": [\n              \"fail\",\n              \"success\"\n            ]\n          },\n          \"response\": {\n            \"type\": \"integer\",\n            \"description\": \"HTTP code response\"\n          },\n          \"pushData\": {\n            \"type\": \"string\",\n            \"description\": \"Event's data information JSON-string\"\n          },\n          \"sentTime\": {\n            \"description\": \"Sent time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"nextSendTime\": {\n            \"description\": \"Next send time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"The log created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"TransactionGatewayLog\": {\n        \"type\": \"object\",\n        \"readOnly\": true,\n        \"properties\": {\n          \"headers\": {\n            \"description\": \"The request headers\",\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"url\": {\n            \"description\": \"The request URL\",\n            \"type\": \"string\"\n          },\n          \"request\": {\n            \"description\": \"The request body\",\n            \"type\": \"string\"\n          },\n          \"response\": {\n            \"description\": \"The response body\",\n            \"type\": \"string\"\n          },\n          \"duration\": {\n            \"description\": \"The request time, msec\",\n            \"type\": \"integer\"\n          },\n          \"createdTime\": {\n            \"description\": \"The log entry created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/TransactionLink\"\n            }\n          }\n        }\n      },\n      \"TransactionRefund\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"amount\"\n        ],\n        \"properties\": {\n          \"amount\": {\n            \"description\": \"Refund amount\",\n            \"type\": \"number\",\n            \"format\": \"double\"\n          }\n        }\n      },\n      \"RedirectUrls\": {\n        \"type\": \"object\",\n        \"description\": \"The redirect URIs\",\n        \"required\": [\n          \"error\",\n          \"success\",\n          \"decline\",\n          \"cancel\"\n        ],\n        \"properties\": {\n          \"error\": {\n            \"type\": \"string\",\n            \"format\": \"url\"\n          },\n          \"success\": {\n            \"type\": \"string\",\n            \"format\": \"url\"\n          },\n          \"decline\": {\n            \"type\": \"string\",\n            \"format\": \"url\"\n          },\n          \"cancel\": {\n            \"type\": \"string\",\n            \"format\": \"url\"\n          }\n        }\n      },\n      \"ThreeDSecureResult\": {\n        \"type\": \"object\",\n        \"readOnly\": true,\n        \"required\": [\n          \"enrolled\",\n          \"authenticated\",\n          \"liability\"\n        ],\n        \"properties\": {\n          \"enrolled\": {\n            \"description\": \"Is the cardholder enrolled in 3D Secure\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"yes\",\n              \"no\",\n              \"invalid card/timeout\",\n              \"unavailable\"\n            ]\n          },\n          \"authenticated\": {\n            \"description\": \"The 3D Secure entry Auth Response Status\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"yes\",\n              \"no\",\n              \"not applicable\",\n              \"attempted\"\n            ]\n          },\n          \"liability\": {\n            \"type\": \"string\",\n            \"enum\": [\n              \"protected\",\n              \"not protected\",\n              \"protected (attempt)\"\n            ]\n          }\n        }\n      },\n      \"Transaction\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The transaction identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"type\": {\n            \"description\": \"Transaction type\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"authorize\",\n              \"capture\",\n              \"credit\",\n              \"refund\",\n              \"sale\",\n              \"void\"\n            ]\n          },\n          \"status\": {\n            \"description\": \"Transaction status\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"completed\",\n              \"connection-error\",\n              \"never-sent\",\n              \"pending\",\n              \"sending\",\n              \"suspended\",\n              \"timeout\",\n              \"waiting-capture\",\n              \"waiting-refund\"\n            ]\n          },\n          \"result\": {\n            \"description\": \"Transaction result\",\n            \"type\": \"string\",\n            \"readOnly\": true,\n            \"enum\": [\n              \"approved\",\n              \"canceled\",\n              \"declined\",\n              \"unknown\"\n            ]\n          },\n          \"amount\": {\n            \"description\": \"The transactions's amount\",\n            \"type\": \"number\",\n            \"format\": \"double\",\n            \"readOnly\": true\n          },\n          \"currency\": {\n            \"description\": \"The transactions's currency\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"parentTransactionId\": {\n            \"description\": \"The transactions's parent ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ],\n            \"readOnly\": true\n          },\n          \"childTransactions\": {\n            \"description\": \"The child transaction IDs\",\n            \"readOnly\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ResourceId\"\n            }\n          },\n          \"invoiceIds\": {\n            \"description\": \"The invoice IDs related to transaction\",\n            \"readOnly\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ResourceId\"\n            }\n          },\n          \"subscriptionIds\": {\n            \"description\": \"The subscription IDs related to transaction\",\n            \"readOnly\": true,\n            \"type\": \"array\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/ResourceId\"\n            }\n          },\n          \"isRebill\": {\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"rebillNumber\": {\n            \"description\": \"The transactions's rebill number\",\n            \"type\": \"integer\",\n            \"readOnly\": true\n          },\n          \"gatewayAccountId\": {\n            \"description\": \"The transactions's Gateway Account ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ],\n            \"readOnly\": true\n          },\n          \"gatewayTransactionId\": {\n            \"description\": \"The gateway's transaction ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ],\n            \"readOnly\": true\n          },\n          \"gateway\": {\n            \"type\": \"object\",\n            \"description\": \"The related gateway information\",\n            \"readOnly\": true,\n            \"properties\": {\n              \"response\": {\n                \"description\": \"The gateway's response\",\n                \"type\": \"object\",\n                \"properties\": {\n                  \"code\": {\n                    \"description\": \"The gateway's response code\",\n                    \"type\": \"string\"\n                  },\n                  \"message\": {\n                    \"description\": \"The gateway's response message\",\n                    \"type\": \"string\"\n                  },\n                  \"type\": {\n                    \"description\": \"The gateway's response type\",\n                    \"type\": \"string\"\n                  },\n                  \"originalCode\": {\n                    \"description\": \"The raw, unmapped gateway's response code\",\n                    \"type\": \"string\"\n                  },\n                  \"originalMessage\": {\n                    \"description\": \"The raw, unmapped gateway's response message\",\n                    \"type\": \"string\"\n                  }\n                }\n              },\n              \"avsResponse\": {\n                \"description\": \"The AVS gateway's response\",\n                \"type\": \"object\",\n                \"properties\": {\n                  \"code\": {\n                    \"description\": \"The raw response code\",\n                    \"type\": \"string\"\n                  },\n                  \"message\": {\n                    \"description\": \"The raw response message\",\n                    \"type\": \"string\"\n                  }\n                }\n              },\n              \"cvvResponse\": {\n                \"description\": \"The CVV gateway's response\",\n                \"type\": \"object\",\n                \"properties\": {\n                  \"code\": {\n                    \"description\": \"The raw response code\",\n                    \"type\": \"string\"\n                  },\n                  \"message\": {\n                    \"description\": \"The raw response message\",\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            }\n          },\n          \"gatewayName\": {\n            \"description\": \"Payment Gateway name, available only when transaction use gateway, else null\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"acquirerName\": {\n            \"description\": \"Acquirer name, available only when transaction use gateway, else null\",\n            \"type\": \"string\",\n            \"readOnly\": true\n          },\n          \"websiteId\": {\n            \"description\": \"Website's ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ],\n            \"readOnly\": true\n          },\n          \"customerId\": {\n            \"description\": \"Customer's ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ],\n            \"readOnly\": true\n          },\n          \"method\": {\n            \"description\": \"Payment Method\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Method\"\n              }\n            ]\n          },\n          \"velocity\": {\n            \"description\": \"The number of transactions by the same customer in the past 24 hours\",\n            \"type\": \"number\",\n            \"format\": \"integer\"\n          },\n          \"bin\": {\n            \"description\": \"Payment Card BIN\",\n            \"type\": \"string\",\n            \"format\": \"bin\",\n            \"readOnly\": true\n          },\n          \"paymentInstrument\": {\n            \"$ref\": \"#/components/schemas/PaymentInstrument\"\n          },\n          \"billingAddress\": {\n            \"description\": \"Billing Address\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ContactObject\"\n              }\n            ]\n          },\n          \"has3ds\": {\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"3ds\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ThreeDSecureResult\"\n              }\n            ]\n          },\n          \"hasDcc\": {\n            \"description\": \"True if transaction has Dynamic Currency Conversion applied\",\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"dcc\": {\n            \"description\": \"Dynamic Currency Conversion detailed information. Null if hasDcc is false\",\n            \"type\": \"object\",\n            \"readOnly\": true,\n            \"properties\": {\n              \"base\": {\n                \"type\": \"object\",\n                \"description\": \"Initial amount and currency to convert from\",\n                \"properties\": {\n                  \"amount\": {\n                    \"type\": \"number\",\n                    \"format\": \"double\"\n                  },\n                  \"currency\": {\n                    \"type\": \"string\"\n                  }\n                }\n              },\n              \"quote\": {\n                \"type\": \"object\",\n                \"description\": \"Suggested amount and currency to convert to\",\n                \"properties\": {\n                  \"amount\": {\n                    \"type\": \"number\",\n                    \"format\": \"double\"\n                  },\n                  \"currency\": {\n                    \"type\": \"string\"\n                  }\n                }\n              },\n              \"usdMarkup\": {\n                \"description\": \"The amount of markup translated to USD\",\n                \"type\": \"number\",\n                \"format\": \"double\"\n              },\n              \"outcome\": {\n                \"type\": \"string\",\n                \"description\": \"Dynamic Currency Conversion outcome\",\n                \"enum\": [\n                  \"rejected\",\n                  \"selected\",\n                  \"unknown\"\n                ]\n              }\n            }\n          },\n          \"riskScore\": {\n            \"description\": \"The transactions's risk score\",\n            \"type\": \"number\",\n            \"format\": \"integer\",\n            \"readOnly\": true\n          },\n          \"riskMetadata\": {\n            \"description\": \"Risk metadata\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/RiskMetadata\"\n              }\n            ]\n          },\n          \"redirectUrls\": {\n            \"$ref\": \"#/components/schemas/RedirectUrls\"\n          },\n          \"retryInstruction\": {\n            \"$ref\": \"#/components/schemas/PaymentRetry\"\n          },\n          \"retryNumber\": {\n            \"type\": \"integer\",\n            \"readOnly\": true,\n            \"description\": \"The position in the sequence of retries\"\n          },\n          \"retriedTransactionId\": {\n            \"readOnly\": true,\n            \"description\": \"The retried transaction ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"description\": {\n            \"type\": \"string\",\n            \"description\": \"The payment description\",\n            \"maxLength\": 255\n          },\n          \"isDisputed\": {\n            \"description\": \"True if transaction is disputed\",\n            \"type\": \"boolean\",\n            \"readOnly\": true\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"scheduledTime\": {\n            \"type\": \"string\",\n            \"description\": \"The time the transaction is scheduled for collection\",\n            \"format\": \"date-time\"\n          },\n          \"processedTime\": {\n            \"description\": \"Transaction processed time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"Transaction created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Transaction updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 13,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/GatewayAccountLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CustomerLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/WebsiteLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/PaymentCardLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/ParentTransactionLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/RetriedTransactionLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/BillingContactLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/LeadSourceLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/ApprovalUrlLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/CancelUrlLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/RefundUrlLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/DisputeLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"UpdatePassword\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"currentPassword\": {\n            \"description\": \"Current user's password - used when requesting password change\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          },\n          \"newPassword\": {\n            \"description\": \"New user's password - used when requesting password change\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          }\n        }\n      },\n      \"User\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"email\",\n          \"firstName\",\n          \"lastName\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The user identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"email\": {\n            \"description\": \"The user email\",\n            \"type\": \"string\",\n            \"format\": \"email\",\n            \"maxLength\": 100\n          },\n          \"firstName\": {\n            \"description\": \"User's first name\",\n            \"type\": \"string\"\n          },\n          \"lastName\": {\n            \"description\": \"User's last name\",\n            \"type\": \"string\"\n          },\n          \"businessPhone\": {\n            \"description\": \"The user business phone number\",\n            \"type\": \"string\"\n          },\n          \"mobilePhone\": {\n            \"description\": \"The user mobile phone number\",\n            \"type\": \"string\"\n          },\n          \"password\": {\n            \"description\": \"User's password. If not provided, password reset email will be sent\",\n            \"type\": \"string\",\n            \"format\": \"password\"\n          },\n          \"permissions\": {\n            \"description\": \"The user's permissions. See the format in example\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/UserPermissions\"\n              }\n            ]\n          },\n          \"createdTime\": {\n            \"description\": \"The user created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"The user updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"loginTime\": {\n            \"description\": \"The user last login time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"reportingCurrency\": {\n            \"description\": \"The user's ISO Alpha-3 code used for reports\",\n            \"type\": \"string\"\n          },\n          \"availableCurrencies\": {\n            \"type\": \"array\",\n            \"description\": \"An array of reporting currencies enabled for the merchant\",\n            \"readOnly\": true,\n            \"items\": {\n              \"type\": \"string\"\n            }\n          },\n          \"totpRequired\": {\n            \"description\": \"The user setting of two-factor authentication\",\n            \"type\": \"boolean\"\n          },\n          \"totpSecret\": {\n            \"description\": \"The user TOTP key for authentication app (if TOTP enabled)\",\n            \"type\": \"string\"\n          },\n          \"totpUrl\": {\n            \"description\": \"The user link to QR-code for TOTP authentication app (if TOTP enabled)\",\n            \"type\": \"string\",\n            \"format\": \"url\"\n          },\n          \"status\": {\n            \"description\": \"The user status\",\n            \"type\": \"string\",\n            \"enum\": [\n              \"active\",\n              \"inactive\",\n              \"pending-confirmation\"\n            ],\n            \"readOnly\": true\n          },\n          \"country\": {\n            \"description\": \"The user country setting - two letter code\",\n            \"type\": \"string\"\n          },\n          \"preferences\": {\n            \"description\": \"User preferences like timezone, language and many more. This is an object with custom properties.\",\n            \"type\": \"object\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 1,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/SelfLink\"\n            }\n          }\n        }\n      },\n      \"UserPermissions\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"items\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"resourceName\": {\n              \"type\": \"string\",\n              \"enum\": [\n                \"3dsecure\",\n                \"api-keys\",\n                \"api-tracking\",\n                \"authentication-options\",\n                \"authentication-tokens\",\n                \"bank-accounts\",\n                \"blacklists\",\n                \"checkout-pages\",\n                \"contacts\",\n                \"coupons\",\n                \"coupons-redemptions\",\n                \"credentials\",\n                \"custom-events\",\n                \"custom-fields\",\n                \"customers\",\n                \"disputes\",\n                \"events\",\n                \"gateway-accounts\",\n                \"invoices\",\n                \"layouts\",\n                \"lead-sources\",\n                \"lists\",\n                \"matched-rules\",\n                \"notes\",\n                \"oct-batch\",\n                \"organizations\",\n                \"password-tokens\",\n                \"payments\",\n                \"payment-cards\",\n                \"payment-cards-migrations\",\n                \"paypal-accounts\",\n                \"plans\",\n                \"reports\",\n                \"reset-sandbox\",\n                \"rulesets\",\n                \"sessions\",\n                \"subscriptions\",\n                \"subscription-tracking\",\n                \"tokens\",\n                \"transactions\",\n                \"users\",\n                \"webhook\",\n                \"webhook-tracking\",\n                \"websites\"\n              ]\n            },\n            \"methods\": {\n              \"type\": \"array\",\n              \"minItems\": 1,\n              \"items\": {\n                \"type\": \"string\",\n                \"enum\": [\n                  \"HEAD\",\n                  \"GET\",\n                  \"POST\",\n                  \"PUT\",\n                  \"DELETE\",\n                  \"PATCH\"\n                ]\n              }\n            },\n            \"resourceIds\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            }\n          }\n        },\n        \"example\": [\n          {\n            \"resourceName\": \"plans\",\n            \"methods\": [\n              \"GET\",\n              \"POST\",\n              \"PUT\",\n              \"HEAD\",\n              \"DELETE\"\n            ]\n          },\n          {\n            \"resourceName\": \"invoices\",\n            \"methods\": [\n              \"GET\",\n              \"HEAD\"\n            ],\n            \"resourceIds\": [\n              \"4f6cf35x-2c4y-483z-a0a9-158621f77a21\",\n              \"1586f35x-4f6c-483z-a0a9-2c4y21f77a21\"\n            ]\n          },\n          {\n            \"resourceName\": null,\n            \"methods\": null,\n            \"resourceIds\": null\n          }\n        ]\n      },\n      \"WebhookAuthorization\": {\n        \"type\": \"object\",\n        \"discriminator\": {\n          \"propertyName\": \"type\"\n        },\n        \"properties\": {\n          \"type\": {\n            \"type\": \"string\",\n            \"description\": \"The authorization type\",\n            \"enum\": [\n              \"none\",\n              \"basic\",\n              \"digest\",\n              \"oauth1\"\n            ],\n            \"default\": \"none\"\n          }\n        },\n        \"required\": [\n          \"type\"\n        ]\n      },\n      \"basic\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/WebhookAuthorization\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"username\": {\n                \"type\": \"string\"\n              },\n              \"password\": {\n                \"type\": \"string\",\n                \"format\": \"password\"\n              }\n            },\n            \"required\": [\n              \"username\",\n              \"password\"\n            ]\n          }\n        ]\n      },\n      \"digest\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/WebhookAuthorization\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"username\": {\n                \"type\": \"string\"\n              },\n              \"password\": {\n                \"type\": \"string\",\n                \"format\": \"password\"\n              }\n            },\n            \"required\": [\n              \"username\",\n              \"password\"\n            ]\n          }\n        ]\n      },\n      \"oauth1\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/WebhookAuthorization\"\n          },\n          {\n            \"type\": \"object\",\n            \"properties\": {\n              \"consumerKey\": {\n                \"type\": \"string\"\n              },\n              \"consumerSecret\": {\n                \"type\": \"string\"\n              },\n              \"token\": {\n                \"type\": \"string\"\n              },\n              \"tokenSecret\": {\n                \"type\": \"string\"\n              }\n            },\n            \"required\": [\n              \"consumerKey\",\n              \"consumerSecret\",\n              \"token\",\n              \"tokenSecret\"\n            ]\n          }\n        ]\n      },\n      \"WebhookCredential\": {\n        \"type\": \"object\",\n        \"description\": \"Webhook credential\",\n        \"properties\": {\n          \"hash\": {\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"host\": {\n            \"type\": \"string\",\n            \"description\": \"The host name\"\n          },\n          \"auth\": {\n            \"$ref\": \"#/components/schemas/WebhookAuthorization\"\n          }\n        },\n        \"required\": [\n          \"host\"\n        ]\n      },\n      \"Website\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"name\",\n          \"url\",\n          \"servicePhone\",\n          \"serviceEmail\"\n        ],\n        \"properties\": {\n          \"id\": {\n            \"description\": \"The website identifier string\",\n            \"readOnly\": true,\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ResourceId\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"The website's name\",\n            \"type\": \"string\"\n          },\n          \"url\": {\n            \"description\": \"The website's domain address\",\n            \"type\": \"string\"\n          },\n          \"servicePhone\": {\n            \"description\": \"The website's customer service phone number\",\n            \"type\": \"string\"\n          },\n          \"serviceEmail\": {\n            \"description\": \"The website's customer service email address\",\n            \"type\": \"string\",\n            \"format\": \"email\"\n          },\n          \"checkoutPageUri\": {\n            \"description\": \"Your own custom URI for this Checkout Page\",\n            \"type\": \"string\"\n          },\n          \"createdTime\": {\n            \"description\": \"Website created time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"updatedTime\": {\n            \"description\": \"Website updated time\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/ServerTimestamp\"\n              }\n            ]\n          },\n          \"customFields\": {\n            \"$ref\": \"#/components/schemas/ResourceCustomFields\"\n          },\n          \"_links\": {\n            \"type\": \"array\",\n            \"description\": \"The links related to resource\",\n            \"readOnly\": true,\n            \"minItems\": 1,\n            \"maxItems\": 2,\n            \"items\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/SelfLink\"\n                },\n                {\n                  \"$ref\": \"#/components/schemas/NotesLink\"\n                }\n              ]\n            }\n          }\n        }\n      },\n      \"WebsiteWebhook\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"webHookUrl\",\n          \"webHookUsername\",\n          \"webHookPassword\"\n        ],\n        \"properties\": {\n          \"webHookUrl\": {\n            \"description\": \"Webhook Url\",\n            \"type\": \"string\"\n          },\n          \"webHookUsername\": {\n            \"description\": \"Webhook HTTP Authentication Username\",\n            \"type\": \"string\"\n          },\n          \"webHookPassword\": {\n            \"description\": \"Webhook HTTP Authentication Password. An empty string will be returned in the response\",\n            \"type\": \"string\"\n          }\n        }\n      }\n    },\n    \"responses\": {\n      \"AccessForbidden\": {\n        \"description\": \"Access forbidden, invalid API-KEY was used\",\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Error\"\n            }\n          }\n        }\n      },\n      \"NotFound\": {\n        \"description\": \"Resource was not found\",\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Error\"\n            }\n          }\n        }\n      },\n      \"Conflict\": {\n        \"description\": \"Conflict\",\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Error\"\n            }\n          }\n        }\n      },\n      \"InvalidDataError\": {\n        \"description\": \"Invalid data was sent\",\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/InvalidError\"\n            }\n          }\n        }\n      }\n    },\n    \"parameters\": {\n      \"resourceId\": {\n        \"name\": \"id\",\n        \"in\": \"path\",\n        \"description\": \"The resource identifier string\",\n        \"required\": true,\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      },\n      \"collectionLimit\": {\n        \"name\": \"limit\",\n        \"in\": \"query\",\n        \"description\": \"The collection items limit\",\n        \"schema\": {\n          \"type\": \"integer\",\n          \"minimum\": 0,\n          \"maximum\": 1000\n        }\n      },\n      \"collectionOffset\": {\n        \"name\": \"offset\",\n        \"in\": \"query\",\n        \"description\": \"The collection items offset\",\n        \"schema\": {\n          \"type\": \"integer\",\n          \"minimum\": 0\n        }\n      },\n      \"collectionFilter\": {\n        \"name\": \"filter\",\n        \"in\": \"query\",\n        \"description\": \"The collection items filter requires a special format.\\nUse \\\",\\\" for multiple allowed values.  Use \\\";\\\" for multiple fields.\\nSee the filter guide for more options and examples about this format.\\n\",\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      },\n      \"collectionQuery\": {\n        \"name\": \"q\",\n        \"in\": \"query\",\n        \"description\": \"The partial search of the text fields.\",\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      },\n      \"collectionCriteria\": {\n        \"name\": \"criteria\",\n        \"in\": \"query\",\n        \"description\": \"The json criteria for collection\",\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      },\n      \"collectionSort\": {\n        \"name\": \"sort\",\n        \"in\": \"query\",\n        \"description\": \"The collection items sort field and order (prefix with \\\"-\\\" for descending sort).\",\n        \"style\": \"form\",\n        \"schema\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"collectionFields\": {\n        \"name\": \"fields\",\n        \"in\": \"query\",\n        \"description\": \"Limit the returned fields to the list specified, separated by comma.  Note that id is always returned.\",\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      },\n      \"collectionExpand\": {\n        \"name\": \"expand\",\n        \"in\": \"query\",\n        \"description\": \"Expand response to get full related object instead of ID.  See the expand guide for more info.\",\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      },\n      \"systemEventType\": {\n        \"name\": \"eventType\",\n        \"in\": \"path\",\n        \"description\": \"The event type\",\n        \"required\": true,\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      },\n      \"rulesVersion\": {\n        \"name\": \"version\",\n        \"in\": \"path\",\n        \"required\": true,\n        \"description\": \"The rule set version. Expand response to get full related object instead of ID.  See the expand guide for more info.\",\n        \"schema\": {\n          \"type\": \"integer\",\n          \"minimum\": 1\n        }\n      },\n      \"hash\": {\n        \"name\": \"hash\",\n        \"in\": \"path\",\n        \"description\": \"The token identifier string\",\n        \"required\": true,\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      },\n      \"mediaType\": {\n        \"name\": \"Accept\",\n        \"in\": \"header\",\n        \"description\": \"The response media type\",\n        \"schema\": {\n          \"type\": \"string\",\n          \"enum\": [\n            \"application/json\"\n          ],\n          \"default\": \"application/json\"\n        }\n      }\n    },\n    \"requestBodies\": {\n      \"ApiKey\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/ApiKey\"\n            }\n          }\n        },\n        \"description\": \"ApiKey resource\",\n        \"required\": true\n      },\n      \"Attachment\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Attachment\"\n            }\n          }\n        },\n        \"description\": \"Attachment resource\",\n        \"required\": true\n      },\n      \"BankAccount\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/BankAccount\"\n            }\n          }\n        },\n        \"description\": \"BankAccount resource\",\n        \"required\": true\n      },\n      \"Blacklist\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Blacklist\"\n            }\n          }\n        },\n        \"description\": \"Blacklist resource\",\n        \"required\": true\n      },\n      \"CheckoutPage\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/CheckoutPage\"\n            }\n          }\n        },\n        \"description\": \"Checkout Page resource\",\n        \"required\": true\n      },\n      \"Contact\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Contact\"\n            }\n          }\n        },\n        \"description\": \"Contact resource\",\n        \"required\": true\n      },\n      \"Coupon\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Coupon\"\n            }\n          }\n        },\n        \"description\": \"Coupon resource\",\n        \"required\": true\n      },\n      \"Credential\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Credential\"\n            }\n          }\n        },\n        \"description\": \"Credential resource\",\n        \"required\": true\n      },\n      \"CustomEvent\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/CustomEvent\"\n            }\n          }\n        },\n        \"description\": \"Custom event resource\",\n        \"required\": true\n      },\n      \"RuleSet\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/RuleSet\"\n            }\n          }\n        },\n        \"description\": \"Set of rules resource\",\n        \"required\": true\n      },\n      \"Customer\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Customer\"\n            }\n          }\n        },\n        \"description\": \"Customer resource\",\n        \"required\": true\n      },\n      \"LeadSource\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/LeadSource\"\n            }\n          }\n        },\n        \"description\": \"Lead Source resource\",\n        \"required\": true\n      },\n      \"Dispute\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Dispute\"\n            }\n          }\n        },\n        \"description\": \"Dispute resource\",\n        \"required\": true\n      },\n      \"GatewayAccount\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/GatewayAccount\"\n            }\n          }\n        },\n        \"description\": \"Gateway Account resource\",\n        \"required\": true\n      },\n      \"Invoice\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Invoice\"\n            }\n          }\n        },\n        \"description\": \"Invoice resource\",\n        \"required\": true\n      },\n      \"Layout\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Layout\"\n            }\n          }\n        },\n        \"description\": \"Layout resource\",\n        \"required\": true\n      },\n      \"List\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/List\"\n            }\n          }\n        },\n        \"description\": \"List resource\",\n        \"required\": true\n      },\n      \"Note\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Note\"\n            }\n          }\n        },\n        \"description\": \"Note resource\",\n        \"required\": true\n      },\n      \"Organization\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Organization\"\n            }\n          }\n        },\n        \"description\": \"Organization resource\",\n        \"required\": true\n      },\n      \"Payment\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Payment\"\n            }\n          }\n        },\n        \"description\": \"Payment resource\",\n        \"required\": true\n      },\n      \"Plan\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Plan\"\n            }\n          }\n        },\n        \"description\": \"Plan resource\",\n        \"required\": true\n      },\n      \"GlobalWebhook\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/GlobalWebhook\"\n            }\n          }\n        },\n        \"description\": \"Webhook resource\",\n        \"required\": true\n      },\n      \"Product\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Product\"\n            }\n          }\n        },\n        \"description\": \"Product resource\",\n        \"required\": true\n      },\n      \"UpdatePassword\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/UpdatePassword\"\n            }\n          }\n        },\n        \"description\": \"currentPassword and newPassword\",\n        \"required\": true\n      },\n      \"Subscription\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Subscription\"\n            }\n          }\n        },\n        \"description\": \"Subscription resource\",\n        \"required\": true\n      },\n      \"PaymentToken\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/PaymentToken\"\n            }\n          }\n        },\n        \"description\": \"PaymentToken resource\",\n        \"required\": true\n      },\n      \"User\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/User\"\n            }\n          }\n        },\n        \"description\": \"User resource\",\n        \"required\": true\n      },\n      \"Website\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Website\"\n            }\n          }\n        },\n        \"description\": \"Website resource\",\n        \"required\": true\n      }\n    },\n    \"securitySchemes\": {\n      \"ApiKey\": {\n        \"description\": \"When you sign up for an account, you are given your first API key.\\nTo do so please follow this link: https://www.rebilly.com/site/signup/\\nAlso you can generate additional API keys, and delete API keys (as you may\\nneed to rotate your keys in the future).\\n\",\n        \"name\": \"REB-APIKEY\",\n        \"type\": \"apiKey\",\n        \"in\": \"header\"\n      },\n      \"JWT\": {\n        \"description\": \"You can create a JSON Web Token (JWT) via our Sessions resource.\\n\",\n        \"type\": \"http\",\n        \"scheme\": \"basic\"\n      },\n      \"RebAuth\": {\n        \"description\": \"Only for the Tokens resource.\\nThe REB-AUTH value is created in this way\\nGenerate a Nonce (random string), and a Timestamp (unix timestamp)\\nConcatenate the values of ApiUser, Nonce, and Timestamp (in that order).\\nUse that value as the input data when you calculate the HMAC-SHA1 with your secret key, called the signature.\\nForming the four data points into a JSON object.\\n\\n```json\\n{\\n  \\\"REB-APIUSER\\\": \\\"abcdefg\\\",\\n  \\\"REB-NONCE\\\": \\\"adfsjtreitou345fgkdafgj\\\",\\n  \\\"REB-TIMESTAMP\\\": \\\"1382591345\\\",\\n  \\\"REB-SIGNATURE\\\": \\\"a234fc95460401cfg09c9d09\\\"\\n}\\n```\\n\\nThen base64 encode that JSON object. This is the final value of the REB-AUTH HTTP header\\n\",\n        \"name\": \"REB-AUTH\",\n        \"type\": \"apiKey\",\n        \"in\": \"header\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "demo/components/FileInput.tsx",
    "content": "import * as yaml from 'js-yaml';\nimport * as React from 'react';\nimport { ChangeEvent, RefObject, useRef } from 'react';\nimport styled from '../../src/styled-components';\n\nconst Button = styled.button`\n  background-color: #fff;\n  color: #333;\n  padding: 2px 10px;\n  touch-action: manipulation;\n  cursor: pointer;\n  user-select: none;\n  border: 1px solid #ccc;\n  font-size: 16px;\n  height: 28px;\n  box-sizing: border-box;\n  vertical-align: middle;\n  line-height: 1;\n  outline: none;\n  white-space: nowrap;\n  @media (max-width: 699px) {\n    display: none;\n  }\n`;\n\nfunction FileInput(props: { onUpload }) {\n  const hiddenFileInput: RefObject<HTMLInputElement> = useRef<HTMLInputElement>(null);\n\n  const handleClick = () => {\n    if (hiddenFileInput && hiddenFileInput.current) {\n      hiddenFileInput.current.click();\n    }\n  };\n\n  const uploadFile = (event: ChangeEvent<HTMLInputElement>) => {\n    const file = (event.target as HTMLInputElement).files![0];\n    const reader = new FileReader();\n    reader.onload = () => {\n      props.onUpload(yaml.load(reader.result));\n    };\n    reader.readAsText(file);\n  };\n\n  return (\n    <span>\n      <Button onClick={handleClick}>Upload a file</Button>\n      <input type=\"file\" style={{ display: 'none' }} onChange={uploadFile} ref={hiddenFileInput} />\n    </span>\n  );\n}\n\nexport default FileInput;\n"
  },
  {
    "path": "demo/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\" />\n    <title>Redoc Interactive Demo</title>\n    <meta\n      name=\"description\"\n      content=\"Redoc Interactive Demo. OpenAPI-generated API Reference Documentation\"\n    />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\n    <meta property=\"og:title\" content=\"Redoc Interactive Demo\" />\n    <meta\n      property=\"og:description\"\n      content=\"Redoc Interactive Demo. OpenAPI-generated API Reference Documentation\"\n    />\n    <meta\n      property=\"og:image\"\n      content=\"https://user-images.githubusercontent.com/3975738/37729752-8a9ea38a-2d46-11e8-8438-42ed26bf1751.png\"\n    />\n    <meta name=\"twitter:card\" content=\"summary_large_image\" />\n\n    <style>\n      body {\n        margin: 0;\n        padding: 0;\n      }\n\n      redoc {\n        display: block;\n      }\n    </style>\n    <link\n      href=\"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700\"\n      rel=\"stylesheet\"\n    />\n  </head>\n\n  <body>\n    <div id=\"container\"></div>\n\n    <script>\n      (function (i, s, o, g, r, a, m) {\n        i['GoogleAnalyticsObject'] = r;\n        (i[r] =\n          i[r] ||\n          function () {\n            (i[r].q = i[r].q || []).push(arguments);\n          }),\n          (i[r].l = 1 * new Date());\n        (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);\n        a.async = 1;\n        a.src = g;\n        m.parentNode.insertBefore(a, m);\n      })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');\n\n      if (window.location.host === 'rebilly.github.io') {\n        ga('create', 'UA-81703547-1', 'auto');\n        ga('send', 'pageview');\n      }\n    </script>\n  </body>\n</html>\n"
  },
  {
    "path": "demo/index.tsx",
    "content": "import * as React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport styled from 'styled-components';\nimport { RedocStandalone } from '../src';\nimport ComboBox from './ComboBox';\nimport FileInput from './components/FileInput';\n\nconst DEFAULT_SPEC = 'museum.yaml';\nconst NEW_VERSION_PETSTORE = 'openapi-3-1.yaml';\n\nconst demos = [\n  { value: DEFAULT_SPEC, label: 'Museum API' },\n  { value: NEW_VERSION_PETSTORE, label: 'Petstore OpenAPI 3.1' },\n  { value: 'https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml', label: 'Instagram' },\n  {\n    value: 'https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/openapi.yaml',\n    label: 'Google Calendar',\n  },\n  { value: 'https://api.apis.guru/v2/specs/slack.com/1.7.0/openapi.yaml', label: 'Slack' },\n  { value: 'https://api.apis.guru/v2/specs/zoom.us/2.0.0/openapi.yaml', label: 'Zoom.us' },\n];\n\nclass DemoApp extends React.Component<\n  Record<string, unknown>,\n  { spec: object | undefined; specUrl: string; dropdownOpen: boolean; cors: boolean }\n> {\n  constructor(props) {\n    super(props);\n\n    let parts = window.location.search.match(/url=([^&]+)/);\n    let url = DEFAULT_SPEC;\n    if (parts && parts.length > 1) {\n      url = decodeURIComponent(parts[1]);\n    }\n\n    parts = window.location.search.match(/[?&]nocors(&|#|$)/);\n    let cors = true;\n    if (parts && parts.length > 1) {\n      cors = false;\n    }\n\n    this.state = {\n      spec: undefined,\n      specUrl: url,\n      dropdownOpen: false,\n      cors,\n    };\n  }\n\n  handleUploadFile = (spec: object) => {\n    this.setState({\n      spec,\n      specUrl: '',\n    });\n  };\n\n  handleChange = (url: string) => {\n    if (url === NEW_VERSION_PETSTORE) {\n      this.setState({ cors: false });\n      0;\n    }\n    this.setState({\n      specUrl: url,\n    });\n    window.history.pushState(\n      undefined,\n      '',\n      updateQueryStringParameter(location.search, 'url', url),\n    );\n  };\n\n  toggleCors = (e: React.ChangeEvent<HTMLInputElement>) => {\n    const cors = e.currentTarget.checked;\n    this.setState({\n      cors,\n    });\n    window.history.pushState(\n      undefined,\n      '',\n      updateQueryStringParameter(location.search, 'nocors', cors ? undefined : ''),\n    );\n  };\n\n  render() {\n    const { specUrl, cors } = this.state;\n    let proxiedUrl = specUrl;\n    if (specUrl !== DEFAULT_SPEC) {\n      proxiedUrl = cors\n        ? 'https://cors.redoc.ly/' + new URL(specUrl, window.location.href).href\n        : specUrl;\n    }\n    return (\n      <>\n        <Heading>\n          <a href=\".\">\n            <Logo\n              src=\"https://github.com/Redocly/redoc/raw/main/docs/images/redoc.png\"\n              alt=\"Redoc logo\"\n            />\n          </a>\n          <ControlsContainer>\n            <FileInput onUpload={this.handleUploadFile} />\n            <ComboBox\n              placeholder={'URL to a spec to try'}\n              options={demos}\n              onChange={this.handleChange}\n              value={specUrl === DEFAULT_SPEC ? '' : specUrl}\n            />\n            <CorsCheckbox title=\"Use CORS proxy\">\n              <input id=\"cors_checkbox\" type=\"checkbox\" onChange={this.toggleCors} checked={cors} />\n              <label htmlFor=\"cors_checkbox\">CORS</label>\n            </CorsCheckbox>\n          </ControlsContainer>\n          <iframe\n            src=\"https://ghbtns.com/github-btn.html?user=Redocly&amp;repo=redoc&amp;type=star&amp;count=true&amp;size=large\"\n            frameBorder=\"0\"\n            scrolling=\"0\"\n            width=\"160px\"\n            height=\"30px\"\n          />\n        </Heading>\n        <RedocStandalone\n          spec={this.state.spec}\n          specUrl={proxiedUrl}\n          options={{ scrollYOffset: 'nav', sanitize: true }}\n        />\n      </>\n    );\n  }\n}\n\n/* ====== Styled components ====== */\n\nconst ControlsContainer = styled.div`\n  display: flex;\n  justify-content: center;\n  flex: 1;\n  margin: 0 15px;\n  align-items: center;\n`;\n\nconst CorsCheckbox = styled.div`\n  margin-left: 10px;\n  white-space: nowrap;\n\n  label {\n    font-size: 13px;\n  }\n\n  @media screen and (max-width: 550px) {\n    display: none;\n  }\n`;\n\nconst Heading = styled.nav`\n  position: sticky;\n  top: 0;\n  width: 100%;\n  height: 50px;\n  box-sizing: border-box;\n  background: white;\n  border-bottom: 1px solid #cccccc;\n  z-index: 10;\n  padding: 5px;\n\n  display: flex;\n  align-items: center;\n  font-family: Roboto, sans-serif;\n`;\n\nconst Logo = styled.img`\n  height: 40px;\n  width: 124px;\n  display: inline-block;\n  margin-right: 15px;\n\n  @media screen and (max-width: 950px) {\n    display: none;\n  }\n`;\n\nconst container = document.getElementById('container');\nconst root = createRoot(container!);\nroot.render(<DemoApp />);\n\n/* ====== Helpers ====== */\nfunction updateQueryStringParameter(uri, key, value) {\n  const keyValue = value === '' ? key : key + '=' + value;\n  const re = new RegExp('([?|&])' + key + '=?.*?(&|#|$)', 'i');\n  if (uri.match(re)) {\n    if (value !== undefined) {\n      return uri.replace(re, '$1' + keyValue + '$2');\n    } else {\n      return uri.replace(re, (_, separator: string, rest: string) => {\n        if (rest.startsWith('&')) {\n          rest = rest.substring(1);\n        }\n        return separator === '&' ? rest : separator + rest;\n      });\n    }\n  } else {\n    if (value === undefined) {\n      return uri;\n    }\n    let hash = '';\n    if (uri.indexOf('#') !== -1) {\n      hash = uri.replace(/.*#/, '#');\n      uri = uri.replace(/#.*/, '');\n    }\n    const separator = uri.indexOf('?') !== -1 ? '&' : '?';\n    return uri + separator + keyValue + hash;\n  }\n}\n"
  },
  {
    "path": "demo/museum.yaml",
    "content": "openapi: 3.1.0\ninfo:\n  title: Redocly Museum API\n  description: An imaginary, but delightful Museum API for interacting with museum services and information. Built with love by Redocly.\n  version: 1.0.0\n  contact:\n    email: team@redocly.com\n    url: 'https://redocly.com/docs/cli/'\n  x-logo:\n    url: 'https://redocly.github.io/redoc/museum-logo.png'\n    altText: Museum logo\n  license:\n    name: MIT\n    url: 'https://opensource.org/license/mit/ '\nservers:\n  - url: 'https://api.fake-museum-example.com/v1'\npaths:\n  /museum-hours:\n    get:\n      summary: Get museum hours\n      description: Get upcoming museum operating hours\n      operationId: getMuseumHours\n      tags:\n        - Operations\n      x-badges:\n        - name: 'Beta'\n          position: before\n          color: purple\n      parameters:\n        - $ref: '#/components/parameters/StartDate'\n        - $ref: '#/components/parameters/PaginationPage'\n        - $ref: '#/components/parameters/PaginationLimit'\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/GetMuseumHoursResponse'\n              examples:\n                default:\n                  summary: Museum opening hours\n                  value:\n                    - date: '2023-09-11'\n                      timeOpen: '09:00'\n                      timeClose: '18:00'\n                    - date: '2023-09-12'\n                      timeOpen: '09:00'\n                      timeClose: '18:00'\n                    - date: '2023-09-13'\n                      timeOpen: '09:00'\n                      timeClose: '18:00'\n                    - date: '2023-09-17'\n                      timeOpen: '09:00'\n                      timeClose: '18:00'\n                closed:\n                  summary: The museum is closed\n                  value: []\n\n        '400':\n          description: Bad request\n        '404':\n          description: Not found\n  /special-events:\n    post:\n      security: []\n      operationId: CreateSpecialEvent\n      summary: Create special event\n      tags:\n        - Events\n      x-badges:\n        - name: 'Alpha'\n          color: purple\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/CreateSpecialEventRequest'\n            examples:\n              default_example:\n                $ref: '#/components/examples/CreateSpecialEventRequestExample'\n      responses:\n        '200':\n          description: success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/SpecialEventResponse'\n              examples:\n                default_example:\n                  $ref: '#/components/examples/CreateSpecialEventResponseExample'\n        '400':\n          description: Bad request\n        '404':\n          description: Not found\n    get:\n      summary: List special events\n      description: Return a list of upcoming special events at the museum.\n      security: []\n      operationId: listSpecialEvents\n      x-badges:\n        - name: 'Gamma'\n      tags:\n        - Events\n      parameters:\n        - name: startDate\n          in: query\n          description: The starting date to retrieve future operating hours from. Defaults to today's date.\n          schema:\n            type: string\n            format: date\n            example: 2023-02-23\n        - name: endDate\n          in: query\n          description: The end of a date range to retrieve special events for. Defaults to 7 days after `startDate`.\n          schema:\n            type: string\n            format: date\n            example: 2023-04-18\n        - name: page\n          in: query\n          description: The page number to retrieve.\n          schema:\n            type: integer\n            default: 1\n            example: 2\n        - name: limit\n          in: query\n          description: The number of days per page.\n          schema:\n            type: integer\n            default: 10\n            maximum: 30\n            example: 15\n\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ListSpecialEventsResponse'\n              examples:\n                default_example:\n                  $ref: '#/components/examples/ListSpecialEventsResponseExample'\n        '400':\n          description: Bad request\n        '404':\n          description: Not found\n  /special-events/{eventId}:\n    get:\n      summary: Get special event\n      description: Get details about a special event.\n      operationId: getSpecialEvent\n      tags:\n        - Events\n      parameters:\n        - $ref: '#/components/parameters/EventId'\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/SpecialEventResponse'\n              examples:\n                default_example:\n                  $ref: '#/components/examples/GetSpecialEventResponseExample'\n        '400':\n          description: Bad request\n        '404':\n          description: Not found\n    patch:\n      summary: Update special event\n      description: Update the details of a special event\n      operationId: updateSpecialEvent\n      tags:\n        - Events\n      parameters:\n        - $ref: '#/components/parameters/EventId'\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/UpdateSpecialEventRequest'\n            examples:\n              default_example:\n                $ref: '#/components/examples/UpdateSpecialEventRequestExample'\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/SpecialEventResponse'\n              examples:\n                default_example:\n                  $ref: '#/components/examples/UpdateSpecialEventResponseExample'\n        '400':\n          description: Bad request\n        '404':\n          description: Not found\n    delete:\n      summary: Delete special event\n      description: Delete a special event from the collection. Allows museum to cancel planned events.\n      operationId: deleteSpecialEvent\n      tags:\n        - Events\n      parameters:\n        - $ref: '#/components/parameters/EventId'\n      responses:\n        '204':\n          description: Success - no content\n        '400':\n          description: Bad request\n        '401':\n          description: Unauthorized\n        '404':\n          description: Not found\n  /tickets:\n    post:\n      summary: Buy museum tickets\n      description: Purchase museum tickets for general entry or special events.\n      operationId: buyMuseumTickets\n      tags:\n        - Tickets\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/BuyMuseumTicketsRequest'\n            examples:\n              general_entry:\n                $ref: '#/components/examples/BuyGeneralTicketsRequestExample'\n              event_entry:\n                $ref: '#/components/examples/BuyEventTicketsRequestExample'\n      responses:\n        '200':\n          description: Success\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/BuyMuseumTicketsResponse'\n              examples:\n                general_entry:\n                  $ref: '#/components/examples/BuyGeneralTicketsResponseExample'\n                event_entry:\n                  $ref: '#/components/examples/BuyEventTicketsResponseExample'\n        '400':\n          description: Bad request\n        '404':\n          description: Not found\n  /tickets/{ticketId}/qr:\n    get:\n      summary: Get ticket QR code\n      description: Return an image of your ticket with scannable QR code. Used for event entry.\n      operationId: getTicketCode\n      tags:\n        - Tickets\n      parameters:\n        - $ref: '#/components/parameters/TicketId'\n      responses:\n        '200':\n          description: Scannable event ticket in image format\n          content:\n            image/png:\n              schema:\n                $ref: '#/components/schemas/GetTicketCodeResponse'\n        '400':\n          description: Bad request\n        '404':\n          description: Not found\ncomponents:\n  schemas:\n    SpecialEvent:\n      description: Request payload for creating new special events at the museum.\n      properties:\n        name:\n          description: Name of the special event\n          type: string\n          example: Fossil lecture\n        location:\n          description: Location where the special event is held\n          type: string\n          example: Lecture theatre\n        eventDescription:\n          description: Description of the special event\n          type: string\n          example: Our panel of experts will share their favorite fossils and explain why they are so great.\n        dates:\n          description: List of planned dates for the special event\n          type: array\n          items:\n            type: string\n            format: date\n            example: 2024-03-29\n        price:\n          description: Price of a ticket for the special event\n          type: number\n          format: float\n          example: 12.50\n\n    TicketType:\n      description: Type of ticket being purchased. Use `general` for regular museum entry and `event` for tickets to special events.\n      type: string\n      enum:\n        - event\n        - general\n      x-enumDescriptions:\n        event: Special event ticket\n        general: General museum entry ticket\n      example: event\n    Date:\n      type: string\n      format: date\n      example: 2023-10-29\n    Email:\n      description: Email address for ticket purchaser.\n      type: string\n      format: email\n      example: museum-lover@example.com\n    Phone:\n      description: Phone number for the ticket purchaser (optional).\n      type: string\n      example: +1(234)-567-8910\n    BuyMuseumTicketsRequest:\n      description: Request payload used for purchasing museum tickets.\n      type: object\n      properties:\n        ticketType:\n          $ref: '#/components/schemas/TicketType'\n        eventId:\n          description: Unique identifier for a special event. Required if purchasing tickets for the museum's special events.\n          $ref: '#/components/schemas/EventId'\n        ticketDate:\n          description: Date that the ticket is valid for.\n          $ref: '#/components/schemas/Date'\n        email:\n          $ref: '#/components/schemas/Email'\n        phone:\n          $ref: '#/components/schemas/Phone'\n      required:\n        - ticketType\n        - ticketDate\n        - email\n    TicketMessage:\n      description: Confirmation message after a ticket purchase.\n      type: string\n      example: Museum general entry ticket purchased\n    TicketId:\n      description: Unique identifier for museum ticket. Generated when purchased.\n      type: string\n      format: uuid\n      example: a54a57ca-36f8-421b-a6b4-2e8f26858a4c\n    TicketConfirmation:\n      description: Unique confirmation code used to verify ticket purchase.\n      type: string\n      example: ticket-event-a98c8f-7eb12\n    BuyMuseumTicketsResponse:\n      description: Details for a museum ticket after a successful purchase.\n      type: object\n      properties:\n        message:\n          $ref: '#/components/schemas/TicketMessage'\n        eventName:\n          $ref: '#/components/schemas/EventName'\n        ticketId:\n          $ref: '#/components/schemas/TicketId'\n        ticketType:\n          $ref: '#/components/schemas/TicketType'\n        ticketDate:\n          description: Date the ticket is valid for.\n          $ref: '#/components/schemas/Date'\n        confirmationCode:\n          $ref: '#/components/schemas/TicketConfirmation'\n      required:\n        - message\n        - ticketId\n        - ticketType\n        - ticketDate\n        - confirmationCode\n    GetTicketCodeResponse:\n      description: An image of a ticket with a QR code used for museum or event entry.\n      type: string\n      format: binary\n    GetMuseumHoursResponse:\n      description: List of museum operating hours for consecutive days.\n      type: array\n      items:\n        $ref: '#/components/schemas/MuseumDailyHours'\n    MuseumDailyHours:\n      description: Daily operating hours for the museum.\n      type: object\n      properties:\n        date:\n          description: Date the operating hours apply to.\n          $ref: '#/components/schemas/Date'\n          example: 2024-12-31\n        timeOpen:\n          type: string\n          pattern: '^([01]\\d|2[0-3]):?([0-5]\\d)$'\n          description: Time the museum opens on a specific date. Uses 24 hour time format (`HH:mm`).\n          example: 09:00\n        timeClose:\n          description: Time the museum closes on a specific date. Uses 24 hour time format (`HH:mm`).\n          type: string\n          pattern: '^([01]\\d|2[0-3]):?([0-5]\\d)$'\n          example: 18:00\n      required:\n        - date\n        - timeOpen\n        - timeClose\n    EventId:\n      description: Identifier for a special event.\n      type: string\n      format: uuid\n      example: 3be6453c-03eb-4357-ae5a-984a0e574a54\n    EventName:\n      type: string\n      description: Name of the special event\n      example: Pirate Coding Workshop\n    EventLocation:\n      type: string\n      description: Location where the special event is held\n      example: Computer Room\n    EventDescription:\n      type: string\n      description: Description of the special event\n      example: Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).\n    EventDates:\n      type: array\n      items:\n        $ref: '#/components/schemas/Date'\n      description: List of planned dates for the special event\n    EventPrice:\n      description: Price of a ticket for the special event\n      type: number\n      format: float\n      example: 25\n    CreateSpecialEventRequest:\n      description: Request payload for creating new special events at the museum.\n      properties:\n        name:\n          $ref: '#/components/schemas/EventName'\n        location:\n          $ref: '#/components/schemas/EventLocation'\n        eventDescription:\n          $ref: '#/components/schemas/EventDescription'\n        dates:\n          $ref: '#/components/schemas/EventDates'\n        price:\n          $ref: '#/components/schemas/EventPrice'\n      required:\n        - name\n        - location\n        - eventDescription\n        - dates\n        - price\n    UpdateSpecialEventRequest:\n      description: Request payload for updating an existing special event. Only included fields are updated in the event.\n      properties:\n        name:\n          $ref: '#/components/schemas/EventName'\n        location:\n          $ref: '#/components/schemas/EventLocation'\n        eventDescription:\n          $ref: '#/components/schemas/EventDescription'\n        dates:\n          $ref: '#/components/schemas/EventDates'\n        price:\n          $ref: '#/components/schemas/EventPrice'\n    ListSpecialEventsResponse:\n      description: A list of upcoming special events\n      type: array\n      items:\n        $ref: '#/components/schemas/SpecialEventResponse'\n    SpecialEventResponse:\n      description: Information about a special event.\n      properties:\n        eventId:\n          $ref: '#/components/schemas/EventId'\n        name:\n          $ref: '#/components/schemas/EventName'\n        location:\n          $ref: '#/components/schemas/EventLocation'\n        eventDescription:\n          $ref: '#/components/schemas/EventDescription'\n        dates:\n          $ref: '#/components/schemas/EventDates'\n        price:\n          $ref: '#/components/schemas/EventPrice'\n      required:\n        - eventId\n        - name\n        - location\n        - eventDescription\n        - dates\n        - price\n  securitySchemes:\n    MuseumPlaceholderAuth:\n      type: http\n      scheme: basic\n  examples:\n    BuyGeneralTicketsRequestExample:\n      summary: General entry ticket\n      value:\n        ticketType: general\n        ticketDate: 2023-09-07\n        email: todd@example.com\n    BuyEventTicketsRequestExample:\n      summary: Special event ticket\n      value:\n        ticketType: general\n        eventId: dad4bce8-f5cb-4078-a211-995864315e39\n        ticketDate: 2023-09-05\n        email: todd@example.com\n    BuyGeneralTicketsResponseExample:\n      summary: General entry ticket\n      value:\n        message: Museum general entry ticket purchased\n        ticketId: 382c0820-0530-4f4b-99af-13811ad0f17a\n        ticketType: general\n        ticketDate: 2023-09-07\n        confirmationCode: ticket-general-e5e5c6-dce78\n    BuyEventTicketsResponseExample:\n      summary: Special event ticket\n      value:\n        message: Museum special event ticket purchased\n        ticketId: b811f723-17b2-44f7-8952-24b03e43d8a9\n        eventName: Mermaid Treasure Identification and Analysis\n        ticketType: event\n        ticketDate: 2023-09-05\n        confirmationCode: ticket-event-9c55eg-8v82a\n    CreateSpecialEventRequestExample:\n      summary: Create special event\n      value:\n        name: Mermaid Treasure Identification and Analysis\n        location: Under the seaaa 🦀 🎶 🌊.\n        eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.\n        dates:\n          - 2023-09-05\n          - 2023-09-08\n        price: 0\n    CreateSpecialEventResponseExample:\n      summary: Special event created\n      value:\n        eventId: dad4bce8-f5cb-4078-a211-995864315e39\n        name: Mermaid Treasure Identification and Analysis\n        location: Under the seaaa 🦀 🎶 🌊.\n        eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.\n        dates:\n          - 2023-09-05\n          - 2023-09-08\n        price: 30\n    GetSpecialEventResponseExample:\n      summary: Get special event\n      value:\n        eventId: 6744a0da-4121-49cd-8479-f8cc20526495\n        name: Time Traveler Tea Party\n        location: Temporal Tearoom\n        eventDescription: Sip tea with important historical figures.\n        dates:\n          - 2023-11-18\n          - 2023-11-25\n          - 2023-12-02\n        price: 60\n    ListSpecialEventsResponseExample:\n      summary: List of special events\n      value:\n        - eventId: f3e0e76e-e4a8-466e-ab9c-ae36c15b8e97\n          name: Sasquatch Ballet\n          location: Seattle... probably\n          eventDescription: They're big, they're hairy, but they're also graceful. Come learn how the biggest feet can have the lightest touch.\n          dates:\n            - 2023-12-15\n            - 2023-12-22\n          price: 40\n        - eventId: 2f14374a-9c65-4ee5-94b7-fba66d893483\n          name: Solar Telescope Demonstration\n          location: Far from the sun.\n          eventDescription: Look at the sun without going blind!\n          dates:\n            - 2023-09-07\n            - 2023-09-14\n          price: 50\n        - eventId: 6aaa61ba-b2aa-4868-b803-603dbbf7bfdb\n          name: Cook like a Caveman\n          location: Fire Pit on East side\n          eventDescription: Learn to cook on an open flame.\n          dates:\n            - 2023-11-10\n            - 2023-11-17\n            - 2023-11-24\n          price: 5\n        - eventId: 602b75e1-5696-4ab8-8c7a-f9e13580f910\n          name: Underwater Basket Weaving\n          location: Rec Center Pool next door.\n          eventDescription: Learn to weave baskets underwater.\n          dates:\n            - 2023-09-12\n            - 2023-09-15\n          price: 15\n        - eventId: dad4bce8-f5cb-4078-a211-995864315e39\n          name: Mermaid Treasure Identification and Analysis\n          location: Room Sea-12\n          eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits — kindly donated by Ariel.\n          dates:\n            - 2023-09-05\n            - 2023-09-08\n          price: 30\n        - eventId: 6744a0da-4121-49cd-8479-f8cc20526495\n          name: Time Traveler Tea Party\n          location: Temporal Tearoom\n          eventDescription: Sip tea with important historical figures.\n          dates:\n            - 2023-11-18\n            - 2023-11-25\n            - 2023-12-02\n          price: 60\n        - eventId: 3be6453c-03eb-4357-ae5a-984a0e574a54\n          name: Pirate Coding Workshop\n          location: Computer Room\n          eventDescription: Captain Blackbeard shares his love of the C...language. And possibly Arrrrr (R lang).\n          dates:\n            - 2023-10-29\n            - 2023-10-30\n            - 2023-10-31\n          price: 45\n        - eventId: 9d90d29a-2af5-4206-97d9-9ea9ceadcb78\n          name: Llama Street Art Through the Ages\n          location: Auditorium\n          eventDescription: Llama street art?! Alpaca my bags -- let's go!\n          dates:\n            - 2023-10-29\n            - 2023-10-30\n            - 2023-10-31\n          price: 45\n        - eventId: a3c7b2c4-b5fb-4ef7-9322-00a919864957\n          name: The Great Parrot Debate\n          location: Outdoor Amphitheatre\n          eventDescription: See leading parrot minds discuss important geopolitical issues.\n          dates:\n            - 2023-11-03\n            - 2023-11-10\n          price: 35\n        - eventId: b92d46b7-4c5d-422b-87a5-287767e26f29\n          name: Eat a Bunch of Corn\n          location: Cafeteria\n          eventDescription: We accidentally bought too much corn. Please come eat it.\n          dates:\n            - 2023-11-10\n            - 2023-11-17\n            - 2023-11-24\n          price: 5\n    UpdateSpecialEventRequestExample:\n      summary: Update special event request\n      value:\n        location: On the beach.\n        price: 15\n    UpdateSpecialEventResponseExample:\n      summary: Update special event\n      value:\n        eventId: dad4bce8-f5cb-4078-a211-995864315e39\n        name: Mermaid Treasure Identification and Analysis\n        location: On the beach.\n        eventDescription: Join us as we review and classify a rare collection of 20 thingamabobs, gadgets, gizmos, whoosits, and whatsits, kindly donated by Ariel.\n        dates:\n          - 2023-09-05\n          - 2023-09-08\n        price: 15\n    GetMuseumHours:\n      summary: Museum opening hours\n      value:\n        - date: '2023-09-11'\n          timeOpen: '09:00'\n          timeClose: '18:00'\n        - date: '2023-09-12'\n          timeOpen: '09:00'\n          timeClose: '18:00'\n        - date: '2023-09-13'\n          timeOpen: '09:00'\n          timeClose: '18:00'\n        - date: '2023-09-14'\n          timeOpen: '09:00'\n          timeClose: '18:00'\n        - date: '2023-09-15'\n          timeOpen: '10:00'\n          timeClose: '16:00'\n        - date: '2023-09-18'\n          timeOpen: '09:00'\n          timeClose: '18:00'\n        - date: '2023-09-19'\n          timeOpen: '09:00'\n          timeClose: '18:00'\n        - date: '2023-09-20'\n          timeOpen: '09:00'\n          timeClose: '18:00'\n        - date: '2023-09-21'\n          timeOpen: '09:00'\n          timeClose: '18:00'\n        - date: '2023-09-22'\n          timeOpen: '10:00'\n          timeClose: '16:00'\n    ClosedMuseumHours:\n      summary: The museum is closed\n      value: []\n  parameters:\n    PaginationPage:\n      name: page\n      in: query\n      description: The page number to retrieve.\n      schema:\n        type: integer\n        default: 1\n        example: 2\n    PaginationLimit:\n      name: limit\n      in: query\n      description: The number of days per page.\n      schema:\n        type: integer\n        default: 10\n        maximum: 30\n        example: 15\n    EventId:\n      name: eventId\n      in: path\n      description: An identifier for a special event.\n      required: true\n      schema:\n        type: string\n        format: uuid\n        example: dad4bce8-f5cb-4078-a211-995864315e39\n    StartDate:\n      name: startDate\n      in: query\n      description: The starting date to retrieve future operating hours from. Defaults to today's date.\n      schema:\n        type: string\n        format: date\n        example: 2023-02-23\n    EndDate:\n      name: endDate\n      in: query\n      description: The end of a date range to retrieve special events for. Defaults to 7 days after `startDate`.\n      schema:\n        type: string\n        format: date\n        example: 2023-04-18\n    TicketId:\n      name: ticketId\n      in: path\n      description: An identifier for a ticket to a museum event. Used to generate ticket image.\n      required: true\n      schema:\n        type: string\n        format: uuid\n        example: a54a57ca-36f8-421b-a6b4-2e8f26858a4c\n\ntags:\n  - name: Operations\n    x-displayName: About the museum\n    description: Operational information about the museum.\n  - name: Events\n    x-displayName: Upcoming events\n    description: Special events hosted by the Museum.\n  - name: Tickets\n    x-displayName: Buy tickets\n    description: Museum tickets for general entrance or special events.\n\nx-tagGroups:\n  - name: Plan your visit\n    tags:\n      - Operations\n      - Events\n  - name: Purchases\n    tags:\n      - Tickets\n  - name: Entities\n    tags:\n      - Schemas\n\nsecurity:\n  - MuseumPlaceholderAuth: []\n"
  },
  {
    "path": "demo/openapi-3-1.yaml",
    "content": "openapi: 3.1.0\nservers:\n  - url: //petstore.swagger.io/v2\n    description: Default server\n  - url: //petstore.swagger.io/sandbox\n    description: Sandbox server\ninfo:\n  description: |\n    This is a sample server Petstore server.\n    You can find out more about Swagger at\n    [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\n    For this sample, you can use the api key `special-key` to test the authorization filters.\n\n    # Introduction\n    This API is documented in **OpenAPI format** and is based on\n    [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\n    It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\n    tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\n    OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md).\n\n    # OpenAPI Specification\n    This API is documented in **OpenAPI format** and is based on\n    [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\n    It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\n    tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\n    OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md).\n\n    # Cross-Origin Resource Sharing\n    This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with  [W3C spec](https://www.w3.org/TR/cors/).\n    And that allows cross-domain communication from the browser.\n    All 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\n    Petstore offers two forms of authentication:\n      - API Key\n      - OAuth2\n    OAuth2 - an open protocol to allow secure authorization in a simple\n    and standard method from web, mobile and desktop applications.\n\n    <SecurityDefinitions />\n\n  version: 1.0.0\n  title: Swagger Petstore\n  summary: My lovely API\n  termsOfService: 'http://swagger.io/terms/'\n  contact:\n    name: API Support\n    email: apiteam@swagger.io\n    url: https://github.com/Redocly/redoc\n  x-logo:\n    url: 'https://redocly.github.io/redoc/petstore-logo.png'\n    altText: Petstore logo\n  license:\n    name: Apache 2.0\n    url: 'http://www.apache.org/licenses/LICENSE-2.0.html'\n    identifier: Apache 2.0\nexternalDocs:\n  description: Find out how to create Github repo for your OpenAPI spec.\n  url: 'https://github.com/Rebilly/generator-openapi-repo'\ntags:\n  - name: pet\n    description: Everything about your Pets\n  - name: store\n    description: Access to Petstore orders\n  - name: user\n    description: Operations about user\n  - name: webhooks\n    description: Everything about your Webhooks\n  - name: pet_model\n    x-displayName: The Pet Model\n    description: |\n      <SchemaDefinition schemaRef=\"#/components/schemas/Pet\" />\n  - name: store_model\n    x-displayName: The Order Model\n    description: |\n      <SchemaDefinition schemaRef=\"#/components/schemas/Order\" exampleRef=\"#/components/examples/Order\" showReadOnly={true} showWriteOnly={true} />\nx-tagGroups:\n  - name: General\n    tags:\n      - pet\n      - store\n      - webhooks\n  - name: User Management\n    tags:\n      - user\n  - name: Models\n    tags:\n      - pet_model\n      - store_model\nsecurity:\n  - {}\npaths:\n  /pet:\n    parameters:\n      - name: Accept-Language\n        in: header\n        description: 'The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US'\n        example: en-US\n        required: false\n        schema:\n          type: string\n          default: en-AU\n      - name: cookieParam\n        in: cookie\n        description: Some cookie\n        required: true\n        schema:\n          type: integer\n          format: int64\n    post:\n      tags:\n        - pet\n      summary: Add a new pet to the store\n      description: Add new pet to the store inventory.\n      operationId: addPet\n      responses:\n        '405':\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      x-codeSamples:\n        - lang: 'C#'\n          source: |\n            PetStore.v1.Pet pet = new PetStore.v1.Pet();\n            pet.setApiKey(\"your api key\");\n            pet.petType = PetStore.v1.Pet.TYPE_DOG;\n            pet.name = \"Rex\";\n            // set other fields\n            PetStoreResponse response = pet.create();\n            if (response.statusCode == HttpStatusCode.Created)\n            {\n              // Successfully created\n            }\n            else\n            {\n              // Something wrong -- check response for errors\n              Console.WriteLine(response.getRawResponse());\n            }\n        - lang: PHP\n          source: |\n            $form = new \\PetStore\\Entities\\Pet();\n            $form->setPetType(\"Dog\");\n            $form->setName(\"Rex\");\n            // set other fields\n            try {\n                $pet = $client->pets()->create($form);\n            } catch (UnprocessableEntityException $e) {\n                var_dump($e->getErrors());\n            }\n      requestBody:\n        $ref: '#/components/requestBodies/Pet'\n    put:\n      tags:\n        - pet\n      summary: Update an existing pet\n      description: ''\n      operationId: updatePet\n      responses:\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Pet not found\n        '405':\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      x-codeSamples:\n        - lang: PHP\n          source: |\n            $form = new \\PetStore\\Entities\\Pet();\n            $form->setPetId(1);\n            $form->setPetType(\"Dog\");\n            $form->setName(\"Rex\");\n            // set other fields\n            try {\n                $pet = $client->pets()->update($form);\n            } catch (UnprocessableEntityException $e) {\n                var_dump($e->getErrors());\n            }\n      requestBody:\n        $ref: '#/components/requestBodies/Pet'\n    delete:\n      tags:\n        - pet\n      summary: OperationId with quotes\n      operationId: deletePetBy\"Id\n    get:\n      tags:\n        - pet\n      summary: OperationId with backslash\n      operationId: delete\\PetById\n  '/pet/{petId}':\n    get:\n      tags:\n        - pet\n      summary: Find pet by ID\n      description: Returns a single pet\n      operationId: getPetById\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet to return\n          required: true\n          deprecated: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Pet'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Pet'\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Pet not found\n      security:\n        - api_key: []\n    post:\n      tags:\n        - pet\n      summary: Updates a pet in the store with form data\n      description: ''\n      operationId: updatePetWithForm\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet that needs to be updated\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '405':\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              type: object\n              properties:\n                name:\n                  description: Updated name of the pet\n                  type: string\n                status:\n                  description: Updated status of the pet\n                  type: string\n    delete:\n      tags:\n        - pet\n      summary: Deletes a pet\n      description: ''\n      operationId: deletePet\n      parameters:\n        - name: api_key\n          in: header\n          required: false\n          schema:\n            type: string\n          example: 'Bearer <TOKEN>'\n        - name: petId\n          in: path\n          description: Pet id to delete\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '400':\n          description: Invalid pet value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  '/pet/{petId}/uploadImage':\n    post:\n      tags:\n        - pet\n      summary: uploads an image\n      description: ''\n      operationId: uploadFile\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet to update\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                unevaluatedProperties:\n                  type: integer\n                  format: int32\n                $ref: '#/components/schemas/ApiResponse'\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      requestBody:\n        content:\n          application/octet-stream:\n            schema:\n              type: string\n              format: binary\n  /pet/findByStatus:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by status\n      description: Multiple status values can be provided with comma separated strings\n      operationId: findPetsByStatus\n      parameters:\n        - name: status\n          in: query\n          description: Status values that need to be considered for filter\n          required: true\n          style: form\n          schema:\n            type: array\n            minItems: 1\n            maxItems: 3\n            items:\n              type: string\n              enum:\n                - available\n                - pending\n                - sold\n              default: available\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Pet'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Pet'\n        '400':\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: >-\n        Multiple tags can be provided with comma separated strings. Use tag1,\n        tag2, tag3 for testing.\n      operationId: findPetsByTags\n      deprecated: true\n      parameters:\n        - name: tags\n          in: query\n          description: Tags to filter by\n          required: true\n          style: form\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Pet'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Pet'\n        '400':\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n        - api_key: []\n  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: ''\n      operationId: placeOrder\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Order'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Order'\n        '400':\n          description: Invalid Order\n          content:\n            application/json:\n              example:\n                status: 400\n                message: 'Invalid Order'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Order'\n        description: order placed for purchasing the pet\n        required: true\n  '/store/order/{orderId}':\n    get:\n      tags:\n        - store\n      summary: Find purchase order by ID\n      description: >-\n        For valid response try integer IDs with value <= 5 or > 10. Other values\n        will generated exceptions\n      operationId: getOrderById\n      parameters:\n        - name: orderId\n          in: path\n          description: ID of pet that needs to be fetched\n          required: true\n          schema:\n            type: integer\n            format: int64\n            minimum: 1\n            maximum: 5\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Order'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Order'\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: >-\n        For valid response try integer IDs with value < 1000. Anything above\n        1000 or nonintegers will generate API errors\n      operationId: deleteOrder\n      parameters:\n        - name: orderId\n          in: path\n          description: ID of the order that needs to be deleted\n          required: true\n          schema:\n            type: string\n            minimum: 1\n      responses:\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Order not found\n  /store/subscribe:\n    post:\n      tags:\n        - store\n      summary: Subscribe to the Store events\n      description: Add subscription for a store events\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                callbackUrl:\n                  type: string\n                  format: uri\n                  description: This URL will be called by the server when the desired event will occur\n                  example: https://myserver.com/send/callback/here\n                eventName:\n                  type: string\n                  description: Event name for the subscription\n                  enum:\n                    - orderInProgress\n                    - orderShipped\n                    - orderDelivered\n                  example: orderInProgress\n              required:\n                - callbackUrl\n                - eventName\n      responses:\n        '201':\n          description: Subscription added\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  subscriptionId:\n                    type: string\n                    example: AAA-123-BBB-456\n        '200':\n          description: Successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                maxItems: 999\n                minItems: 0\n                items:\n                  type: array\n                  maxItems: 777\n                  minItems: 111\n                  items:\n                    type: number\n      callbacks:\n        orderInProgress:\n          '{$request.body#/callbackUrl}?event={$request.body#/eventName}':\n            servers:\n              - url: //callback-url.path-level/v1\n                description: Path level server 1\n              - url: //callback-url.path-level/v2\n                description: Path level server 2\n            post:\n              summary: Order in Progress (Summary)\n              description: A callback triggered every time an Order is updated status to \"inProgress\" (Description)\n              externalDocs:\n                description: Find out more\n                url: 'https://more-details.com/demo'\n              requestBody:\n                content:\n                  application/json:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                        timestamp:\n                          type: string\n                          format: date-time\n                          example: '2018-10-19T16:46:45Z'\n                        status:\n                          type: string\n                          example: 'inProgress'\n                  application/xml:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                    example: |\n                      <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n                      <root>\n                        <orderId>123</orderId>\n                        <status>inProgress</status>\n                        <timestamp>2018-10-19T16:46:45Z</timestamp>\n                      </root>\n              responses:\n                '200':\n                  description: Callback successfully processed and no retries will be performed\n                  content:\n                    application/json:\n                      schema:\n                        type: object\n                        properties:\n                          someProp:\n                            type: string\n                            example: '123'\n                '299':\n                  description: Response for cancelling subscription\n                '500':\n                  description: Callback processing failed and retries will be performed\n              x-codeSamples:\n                - lang: 'C#'\n                  source: |\n                    PetStore.v1.Pet pet = new PetStore.v1.Pet();\n                    pet.setApiKey(\"your api key\");\n                    pet.petType = PetStore.v1.Pet.TYPE_DOG;\n                    pet.name = \"Rex\";\n                    // set other fields\n                    PetStoreResponse response = pet.create();\n                    if (response.statusCode == HttpStatusCode.Created)\n                    {\n                      // Successfully created\n                    }\n                    else\n                    {\n                      // Something wrong -- check response for errors\n                      Console.WriteLine(response.getRawResponse());\n                    }\n                - lang: PHP\n                  source: |\n                    $form = new \\PetStore\\Entities\\Pet();\n                    $form->setPetType(\"Dog\");\n                    $form->setName(\"Rex\");\n                    // set other fields\n                    try {\n                        $pet = $client->pets()->create($form);\n                    } catch (UnprocessableEntityException $e) {\n                        var_dump($e->getErrors());\n                    }\n            put:\n              description: Order in Progress (Only Description)\n              servers:\n                - url: //callback-url.operation-level/v1\n                  description: Operation level server 1 (Operation override)\n                - url: //callback-url.operation-level/v2\n                  description: Operation level server 2 (Operation override)\n              requestBody:\n                content:\n                  application/json:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                        timestamp:\n                          type: string\n                          format: date-time\n                          example: '2018-10-19T16:46:45Z'\n                        status:\n                          type: string\n                          example: 'inProgress'\n                  application/xml:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                    example: |\n                      <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n                      <root>\n                        <orderId>123</orderId>\n                        <status>inProgress</status>\n                        <timestamp>2018-10-19T16:46:45Z</timestamp>\n                      </root>\n              responses:\n                '200':\n                  description: Callback successfully processed and no retries will be performed\n                  content:\n                    application/json:\n                      schema:\n                        type: object\n                        properties:\n                          someProp:\n                            type: string\n                            example: '123'\n        orderShipped:\n          '{$request.body#/callbackUrl}?event={$request.body#/eventName}':\n            post:\n              description: |\n                Very long description\n                Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n                incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\n                nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n                Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\n                fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\n                culpa qui officia deserunt mollit anim id est laborum.\n              requestBody:\n                content:\n                  application/json:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                        timestamp:\n                          type: string\n                          format: date-time\n                          example: '2018-10-19T16:46:45Z'\n                        estimatedDeliveryDate:\n                          type: string\n                          format: date-time\n                          example: '2018-11-11T16:00:00Z'\n              responses:\n                '200':\n                  description: Callback successfully processed and no retries will be performed\n        orderDelivered:\n          'http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}':\n            post:\n              deprecated: true\n              summary: Order delivered\n              description: A callback triggered every time an Order is delivered to the recipient\n              requestBody:\n                content:\n                  application/json:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                        timestamp:\n                          type: string\n                          format: date-time\n                          example: '2018-10-19T16:46:45Z'\n              responses:\n                '200':\n                  description: Callback successfully processed and no retries will be performed\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n        description: Created user object\n        required: true\n  '/user/{username}':\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: ''\n      operationId: getUserByName\n      parameters:\n        - name: username\n          in: path\n          description: 'The name that needs to be fetched. Use user1 for testing. '\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/User'\n        '400':\n          description: Invalid username supplied\n        '404':\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be updated\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: User is updated successfully\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n        '400':\n          description: Invalid user supplied\n        '404':\n          description: User not found\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n        description: Updated user object\n        required: true\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        '204':\n          description: User is deleted\n        '400':\n          description: Invalid username supplied\n        '404':\n          description: User not found\n  /user/createWithArray:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: ''\n      operationId: createUsersWithArrayInput\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        $ref: '#/components/requestBodies/UserArray'\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: ''\n      operationId: createUsersWithListInput\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        $ref: '#/components/requestBodies/UserArray'\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: ''\n      operationId: loginUser\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          schema:\n            type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: successful operation\n          headers:\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n          content:\n            application/json:\n              schema:\n                type: string\n              examples:\n                response:\n                  value: OK\n            application/xml:\n              schema:\n                type: string\n              examples:\n                response:\n                  value: <Message> OK </Message>\n            text/plain:\n              examples:\n                response:\n                  value: OK\n        '400':\n          description: Invalid username/password supplied\n  /user/logout:\n    get:\n      tags:\n        - user\n      summary: Logs out current logged in user session\n      description: ''\n      operationId: logoutUser\n      responses:\n        default:\n          description: successful operation\ncomponents:\n  pathItems:\n    webhooks:\n      put:\n        summary: Get a cat details after update\n        description: Get a cat details after update\n        operationId: updatedCat\n        tags:\n          - webhooks\n        requestBody:\n          description: Information about cat in the system\n          content:\n            multipart/form-data:\n              schema:\n                $ref: '#/components/schemas/Cat'\n        responses:\n          '200':\n            description: update Cat details\n      post:\n        summary: Create new cat\n        description: Info about new cat\n        operationId: createdCat\n        tags:\n          - webhooks\n        requestBody:\n          description: Information about cat in the system\n          content:\n            multipart/form-data:\n              schema:\n                $ref: '#/components/schemas/Cat'\n        responses:\n          '200':\n            description: create Cat details\n  schemas:\n    ApiResponse:\n      type: object\n      patternProperties:\n        ^S_\\\\w+\\\\.[1-9]{2,4}$:\n          description: The measured skill for hunting\n          if:\n            x-displayName: fieldName === 'status'\n          else:\n            minLength: 1\n            maxLength: 10\n          then:\n            format: url\n            type: string\n            enum:\n              - success\n              - failed\n        ^O_\\\\w+\\\\.[1-9]{2,4}$:\n          type: object\n          properties:\n            nestedProperty:\n              type: [string, boolean]\n              description: The measured skill for hunting\n              default: lazy\n              example: adventurous\n              enum:\n                - clueless\n                - lazy\n                - adventurous\n                - aggressive\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n    Cat:\n      description: A representation of a cat\n      allOf:\n        - $ref: '#/components/schemas/Pet'\n        - type: object\n          properties:\n            huntingSkill:\n              type: [string, boolean]\n              description: The measured skill for hunting\n              default: lazy\n              example: adventurous\n              enum:\n                - clueless\n                - lazy\n                - adventurous\n                - aggressive\n          required:\n            - huntingSkill\n    Category:\n      type: object\n      properties:\n        id:\n          description: Category ID\n          $ref: '#/components/schemas/Id'\n        name:\n          description: Category name\n          type: string\n          minLength: 1\n        sub:\n          description: Test Sub Category\n          type: object\n          properties:\n            prop1:\n              type: string\n              description: Dumb Property\n      xml:\n        name: Category\n    Dog:\n      description: A representation of a dog\n      allOf:\n        - $ref: '#/components/schemas/Pet'\n        - type: object\n          properties:\n            packSize:\n              type: integer\n              format: int32\n              description: The size of the pack the dog is from\n              default: 1\n              minimum: 1\n          required:\n            - packSize\n    HoneyBee:\n      description: A representation of a honey bee\n      allOf:\n        - $ref: '#/components/schemas/Pet'\n        - type: object\n          properties:\n            honeyPerDay:\n              type: number\n              description: Average amount of honey produced per day in ounces\n              example: 3.14\n              multipleOf: .01\n          required:\n            - honeyPerDay\n    Id:\n      type: integer\n      format: int64\n      readOnly: true\n    Order:\n      type: object\n      properties:\n        id:\n          description: Order ID\n          $ref: '#/components/schemas/Id'\n        petId:\n          description: Pet ID\n          $ref: '#/components/schemas/Id'\n        quantity:\n          type: integer\n          format: int32\n          minimum: 1\n          default: 1\n        shipDate:\n          description: Estimated ship date\n          type: string\n          format: date-time\n        status:\n          type: string\n          description: Order Status\n          enum:\n            - placed\n            - approved\n            - delivered\n        complete:\n          description: Indicates whenever order was completed or not\n          type: boolean\n          default: false\n          readOnly: true\n        requestId:\n          description: Unique Request Id\n          type: string\n          writeOnly: true\n      xml:\n        name: Order\n    Pet:\n      type: object\n      required:\n        - name\n        - photoUrls\n      discriminator:\n        propertyName: petType\n        mapping:\n          cat: '#/components/schemas/Cat'\n          dog: '#/components/schemas/Dog'\n          bee: '#/components/schemas/HoneyBee'\n      properties:\n        id:\n          externalDocs:\n            description: 'Find more info here'\n            url: 'https://example.com'\n          description: Pet ID\n          $ref: '#/components/schemas/Id'\n        category:\n          description: Categories this pet belongs to\n          $ref: '#/components/schemas/Category'\n        name:\n          description: The name given to a pet\n          type: string\n          example: Guru\n        photoUrls:\n          description: The list of URL to a cute photos featuring pet\n          type: [string, integer, 'null']\n          minItems: 1\n          maxItems: 10\n          default: []\n          xml:\n            name: photoUrl\n            wrapped: true\n          items:\n            type: string\n            format: url\n          if:\n            x-displayName: isString\n            type: string\n          then:\n            minItems: 1\n            maxItems: 15\n          else:\n            x-displayName: notString\n            type: [integer, 'null']\n            minItems: 1\n            maxItems: 20\n        friend:\n          $ref: '#/components/schemas/Pet'\n        tags:\n          description: Tags attached to the pet\n          type: array\n          exclusiveMaximum: 100\n          exclusiveMinimum: 0\n          xml:\n            name: tag\n            wrapped: true\n          items:\n            $ref: '#/components/schemas/Tag'\n        status:\n          type: string\n          description: Pet status in the store\n          enum:\n            - available\n            - pending\n            - sold\n          default: pending\n        petType:\n          description: Type of a pet\n          type: string\n        huntingSkill:\n          type: [integer]\n          enum:\n            - 0\n            - 1\n            - 2\n      xml:\n        name: Pet\n    Tag:\n      type: object\n      properties:\n        id:\n          type: number\n          description: Tag ID\n          $ref: '#/components/schemas/Id'\n        name:\n          description: Tag name\n          type: string\n          minLength: 1\n      xml:\n        name: Tag\n    User:\n      type: object\n      properties:\n        id:\n          $ref: '#/components/schemas/Id'\n        pet:\n          oneOf:\n            - $ref: '#/components/schemas/Pet'\n              title: Pettie\n            - $ref: '#/components/schemas/Tag'\n        username:\n          description: User supplied username\n          type: string\n          minLength: 4\n          example: John78\n        firstName:\n          description: User first name\n          type: string\n          minLength: 1\n          example: John\n        lastName:\n          description: User last name\n          type: string\n          minLength: 1\n          example: Smith\n        email:\n          description: User email address\n          type: string\n          format: email\n          example: john.smith@example.com\n        password:\n          type: string\n          description: >-\n            User password, MUST contain a mix of upper and lower case letters,\n            as well as digits\n          format: password\n          minLength: 8\n          pattern: '/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/'\n          example: drowssaP123\n        phone:\n          description: User phone number in international format\n          type: string\n          pattern: '/^\\+(?:[0-9]-?){6,14}[0-9]$/'\n          example: +1-202-555-0192\n        userStatus:\n          description: User status\n          type: integer\n          format: int32\n        image:\n          description: User image\n          type: string\n          contentEncoding: base64\n          contentMediaType: image/png\n        addresses:\n          type: array\n          minItems: 0\n          maxLength: 10\n          prefixItems:\n            - type: object\n              properties:\n                city:\n                  type: string\n                  minLength: 0\n                country:\n                  type: string\n                  minLength: 0\n                street:\n                  description: includes build/apartment number\n                  type: string\n                  minLength: 0\n            - type: number\n          items:\n            type: string\n      if:\n        title: userStatus === 10\n        properties:\n          userStatus:\n            enum: [10]\n      then:\n        required: ['phone']\n      else:\n        required: []\n      xml:\n        name: User\n  requestBodies:\n    Pet:\n      content:\n        application/json:\n          schema:\n            description: My Pet\n            title: Pettie\n            $ref: '#/components/schemas/Pet'\n        application/xml:\n          schema:\n            type: 'object'\n            properties:\n              name:\n                type: string\n                description: hooray\n      description: Pet object that needs to be added to the store\n      required: true\n    UserArray:\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: '#/components/schemas/User'\n      description: List of user object\n      required: true\n  securitySchemes:\n    petstore_auth:\n      description: |\n        Get access to data while protecting your account credentials.\n        OAuth2 is also a safer and more secure way to give you access.\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'\n          scopes:\n            'write:pets': modify pets in your account\n            'read:pets': read your pets\n    api_key:\n      description: >\n        For this sample, you can use the api key `special-key` to test the\n        authorization filters.\n      type: apiKey\n      name: api_key\n      in: header\n  examples:\n    Order:\n      value:\n        quantity: 1\n        shipDate: '2018-10-19T16:46:45Z'\n        status: placed\n        complete: false\nwebhooks:\n  newPet:\n    post:\n      summary: New pet\n      description: Information about a new pet in the systems\n      operationId: newPet\n      tags:\n        - webhooks\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Pet'\n      responses:\n        '200':\n          description: Return a 200 status to indicate that the data was received successfully\n  myWebhook:\n    $ref: '#/components/pathItems/webhooks'\n    description: Overriding description\n    summary: Overriding summary\n"
  },
  {
    "path": "demo/openapi.yaml",
    "content": "openapi: 3.0.0\nservers:\n  - url: //petstore.swagger.io/v2\n    description: Default server\n  - url: //petstore.swagger.io/sandbox\n    description: Sandbox server\ninfo:\n  description: |\n    This is a sample server Petstore server.\n    You can find out more about Swagger at\n    [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\n    For this sample, you can use the api key `special-key` to test the authorization filters.\n\n    # Introduction\n    This API is documented in **OpenAPI format** and is based on\n    [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\n    It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\n    tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\n    OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md).\n\n    # OpenAPI Specification\n    This API is documented in **OpenAPI format** and is based on\n    [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\n    It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\n    tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\n    OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md).\n\n    # Cross-Origin Resource Sharing\n    This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with  [W3C spec](https://www.w3.org/TR/cors/).\n    And that allows cross-domain communication from the browser.\n    All 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\n    Petstore offers two forms of authentication:\n      - API Key\n      - OAuth2\n    OAuth2 - an open protocol to allow secure authorization in a simple\n    and standard method from web, mobile and desktop applications.\n\n    <!-- ReDoc-Inject: <security-definitions> -->\n\n  version: 1.0.0\n  title: Swagger Petstore\n  termsOfService: 'http://swagger.io/terms/'\n  contact:\n    name: API Support\n    email: apiteam@swagger.io\n    url: https://github.com/Redocly/redoc\n  x-logo:\n    url: 'https://redocly.github.io/redoc/petstore-logo.png'\n    altText: Petstore logo\n  license:\n    name: Apache 2.0\n    url: 'http://www.apache.org/licenses/LICENSE-2.0.html'\nexternalDocs:\n  description: Find out how to create Github repo for your OpenAPI spec.\n  url: 'https://github.com/Rebilly/generator-openapi-repo'\ntags:\n  - name: pet\n    description: Everything about your Pets\n  - name: store\n    description: Access to Petstore orders\n  - name: user\n    description: Operations about user\n  - name: pet_model\n    x-displayName: The Pet Model\n    description: |\n      <SchemaDefinition schemaRef=\"#/components/schemas/Pet\" />\n  - name: store_model\n    x-displayName: The Order Model\n    description: |\n      <SchemaDefinition schemaRef=\"#/components/schemas/Order\" exampleRef=\"#/components/examples/Order\" showReadOnly={true} showWriteOnly={true} />\nx-tagGroups:\n  - name: General\n    tags:\n      - pet\n      - store\n  - name: User Management\n    tags:\n      - user\n  - name: Models\n    tags:\n      - pet_model\n      - store_model\nsecurity:\n  - {}\npaths:\n  /pet:\n    parameters:\n      - name: Accept-Language\n        in: header\n        description: 'The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US'\n        example: en-US\n        required: false\n        schema:\n          type: string\n          default: en-AU\n      - name: cookieParam\n        in: cookie\n        description: Some cookie\n        required: true\n        schema:\n          type: integer\n          format: int64\n    post:\n      tags:\n        - pet\n      x-badges:\n        - name: 'Beta'\n          position: before\n          color: purple\n      summary: Add a new pet to the store\n      description: Add new pet to the store inventory.\n      operationId: addPet\n      responses:\n        '405':\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      x-codeSamples:\n        - lang: 'C#'\n          source: |\n            PetStore.v1.Pet pet = new PetStore.v1.Pet();\n            pet.setApiKey(\"your api key\");\n            pet.petType = PetStore.v1.Pet.TYPE_DOG;\n            pet.name = \"Rex\";\n            // set other fields\n            PetStoreResponse response = pet.create();\n            if (response.statusCode == HttpStatusCode.Created)\n            {\n              // Successfully created\n            }\n            else\n            {\n              // Something wrong -- check response for errors\n              Console.WriteLine(response.getRawResponse());\n            }\n        - lang: PHP\n          source: |\n            $form = new \\PetStore\\Entities\\Pet();\n            $form->setPetType(\"Dog\");\n            $form->setName(\"Rex\");\n            // set other fields\n            try {\n                $pet = $client->pets()->create($form);\n            } catch (UnprocessableEntityException $e) {\n                var_dump($e->getErrors());\n            }\n      requestBody:\n        $ref: '#/components/requestBodies/Pet'\n    put:\n      tags:\n        - pet\n      x-badges:\n        - name: 'Alpha'\n          color: purple\n      summary: Update an existing pet\n      description: ''\n      operationId: updatePet\n      responses:\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Pet not found\n        '405':\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      x-codeSamples:\n        - lang: PHP\n          source: |\n            $form = new \\PetStore\\Entities\\Pet();\n            $form->setPetId(1);\n            $form->setPetType(\"Dog\");\n            $form->setName(\"Rex\");\n            // set other fields\n            try {\n                $pet = $client->pets()->update($form);\n            } catch (UnprocessableEntityException $e) {\n                var_dump($e->getErrors());\n            }\n      requestBody:\n        $ref: '#/components/requestBodies/Pet'\n  '/pet/{petId}':\n    get:\n      tags:\n        - pet\n      x-badges:\n        - name: 'Gamma'\n      summary: Find pet by ID\n      description: Returns a single pet\n      operationId: getPetById\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet to return\n          required: true\n          deprecated: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Pet'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Pet'\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Pet not found\n      security:\n        - api_key: []\n    post:\n      tags:\n        - pet\n      summary: Updates a pet in the store with form data\n      description: ''\n      operationId: updatePetWithForm\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet that needs to be updated\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '405':\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      requestBody:\n        content:\n          application/x-www-form-urlencoded:\n            schema:\n              type: object\n              properties:\n                name:\n                  description: Updated name of the pet\n                  type: string\n                status:\n                  description: Updated status of the pet\n                  type: string\n    delete:\n      tags:\n        - pet\n      summary: Deletes a pet\n      description: ''\n      operationId: deletePet\n      parameters:\n        - name: api_key\n          in: header\n          required: false\n          schema:\n            type: string\n          example: 'Bearer <TOKEN>'\n        - name: petId\n          in: path\n          description: Pet id to delete\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '400':\n          description: Invalid pet value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  '/pet/{petId}/uploadImage':\n    post:\n      tags:\n        - pet\n      summary: uploads an image\n      description: ''\n      operationId: uploadFile\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet to update\n          required: true\n          schema:\n            type: integer\n            format: int64\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/ApiResponse'\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      requestBody:\n        content:\n          application/octet-stream:\n            schema:\n              type: string\n              format: binary\n  /pet/findByStatus:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by status\n      description: Multiple status values can be provided with comma separated strings\n      operationId: findPetsByStatus\n      parameters:\n        - name: status\n          in: query\n          description: Status values that need to be considered for filter\n          required: true\n          style: form\n          schema:\n            type: array\n            minItems: 1\n            maxItems: 3\n            items:\n              type: string\n              enum:\n                - available\n                - pending\n                - sold\n              default: available\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Pet'\n            application/xml:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Pet'\n        '400':\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: >-\n        Multiple tags can be provided with comma separated strings. Use tag1,\n        tag2, tag3 for testing.\n      operationId: findPetsByTags\n      deprecated: true\n      parameters:\n        - name: tags\n          in: query\n          description: Tags to filter by\n          required: true\n          style: form\n          schema:\n            type: array\n            items:\n              type: string\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/Pet'\n            application/xml:\n              schema:\n                type: array\n                maxItems: 999\n                items:\n                  maxItems: 111\n                  $ref: '#/components/schemas/Pet'\n        '400':\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                type: object\n                minProperties: 2\n                additionalProperties:\n                  type: integer\n                  format: int32\n      security:\n        - api_key: []\n  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: ''\n      operationId: placeOrder\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Order'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Order'\n        '400':\n          description: Invalid Order\n          content:\n            application/json:\n              example:\n                status: 400\n                message: 'Invalid Order'\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Order'\n        description: order placed for purchasing the pet\n        required: true\n  '/store/order/{orderId}':\n    get:\n      tags:\n        - store\n      summary: Find purchase order by ID\n      description: >-\n        For valid response try integer IDs with value <= 5 or > 10. Other values\n        will generated exceptions\n      operationId: getOrderById\n      parameters:\n        - name: orderId\n          in: path\n          description: ID of pet that needs to be fetched\n          required: true\n          schema:\n            type: integer\n            format: int64\n            minimum: 1\n            maximum: 5\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/Order'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/Order'\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: >-\n        For valid response try integer IDs with value < 1000. Anything above\n        1000 or nonintegers will generate API errors\n      operationId: deleteOrder\n      parameters:\n        - name: orderId\n          in: path\n          description: ID of the order that needs to be deleted\n          required: true\n          schema:\n            type: string\n            minimum: 1\n      responses:\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Order not found\n  /store/subscribe:\n    post:\n      tags:\n        - store\n      summary: Subscribe to the Store events\n      description: Add subscription for a store events\n      requestBody:\n        content:\n          application/json:\n            schema:\n              type: object\n              properties:\n                callbackUrl:\n                  type: string\n                  format: uri\n                  description: This URL will be called by the server when the desired event will occur\n                  example: https://myserver.com/send/callback/here\n                eventName:\n                  type: string\n                  description: Event name for the subscription\n                  enum:\n                    - orderInProgress\n                    - orderShipped\n                    - orderDelivered\n                  example: orderInProgress\n              required:\n                - callbackUrl\n                - eventName\n      responses:\n        '201':\n          description: Subscription added\n          content:\n            application/json:\n              schema:\n                type: object\n                properties:\n                  subscriptionId:\n                    type: string\n                    example: AAA-123-BBB-456\n      callbacks:\n        orderInProgress:\n          '{$request.body#/callbackUrl}?event={$request.body#/eventName}':\n            servers:\n              - url: //callback-url.path-level/v1\n                description: Path level server 1\n              - url: //callback-url.path-level/v2\n                description: Path level server 2\n            post:\n              summary: Order in Progress (Summary)\n              description: A callback triggered every time an Order is updated status to \"inProgress\" (Description)\n              externalDocs:\n                description: Find out more\n                url: 'https://more-details.com/demo'\n              requestBody:\n                content:\n                  application/json:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                        timestamp:\n                          type: string\n                          format: date-time\n                          example: '2018-10-19T16:46:45Z'\n                        status:\n                          type: string\n                          example: 'inProgress'\n                  application/xml:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                    example: |\n                      <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n                      <root>\n                        <orderId>123</orderId>\n                        <status>inProgress</status>\n                        <timestamp>2018-10-19T16:46:45Z</timestamp>\n                      </root>\n              responses:\n                '200':\n                  description: Callback successfully processed and no retries will be performed\n                  content:\n                    application/json:\n                      schema:\n                        type: object\n                        properties:\n                          someProp:\n                            type: string\n                            example: '123'\n                '299':\n                  description: Response for cancelling subscription\n                '500':\n                  description: Callback processing failed and retries will be performed\n              x-codeSamples:\n                - lang: 'C#'\n                  source: |\n                    PetStore.v1.Pet pet = new PetStore.v1.Pet();\n                    pet.setApiKey(\"your api key\");\n                    pet.petType = PetStore.v1.Pet.TYPE_DOG;\n                    pet.name = \"Rex\";\n                    // set other fields\n                    PetStoreResponse response = pet.create();\n                    if (response.statusCode == HttpStatusCode.Created)\n                    {\n                      // Successfully created\n                    }\n                    else\n                    {\n                      // Something wrong -- check response for errors\n                      Console.WriteLine(response.getRawResponse());\n                    }\n                - lang: PHP\n                  source: |\n                    $form = new \\PetStore\\Entities\\Pet();\n                    $form->setPetType(\"Dog\");\n                    $form->setName(\"Rex\");\n                    // set other fields\n                    try {\n                        $pet = $client->pets()->create($form);\n                    } catch (UnprocessableEntityException $e) {\n                        var_dump($e->getErrors());\n                    }\n            put:\n              description: Order in Progress (Only Description)\n              servers:\n                - url: //callback-url.operation-level/v1\n                  description: Operation level server 1 (Operation override)\n                - url: //callback-url.operation-level/v2\n                  description: Operation level server 2 (Operation override)\n              requestBody:\n                content:\n                  application/json:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                        timestamp:\n                          type: string\n                          format: date-time\n                          example: '2018-10-19T16:46:45Z'\n                        status:\n                          type: string\n                          example: 'inProgress'\n                  application/xml:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                    example: |\n                      <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n                      <root>\n                        <orderId>123</orderId>\n                        <status>inProgress</status>\n                        <timestamp>2018-10-19T16:46:45Z</timestamp>\n                      </root>\n              responses:\n                '200':\n                  description: Callback successfully processed and no retries will be performed\n                  content:\n                    application/json:\n                      schema:\n                        type: object\n                        properties:\n                          someProp:\n                            type: string\n                            example: '123'\n        orderShipped:\n          '{$request.body#/callbackUrl}?event={$request.body#/eventName}':\n            post:\n              description: |\n                Very long description\n                Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n                incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis\n                nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.\n                Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu\n                fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in\n                culpa qui officia deserunt mollit anim id est laborum.\n              requestBody:\n                content:\n                  application/json:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                        timestamp:\n                          type: string\n                          format: date-time\n                          example: '2018-10-19T16:46:45Z'\n                        estimatedDeliveryDate:\n                          type: string\n                          format: date-time\n                          example: '2018-11-11T16:00:00Z'\n              responses:\n                '200':\n                  description: Callback successfully processed and no retries will be performed\n        orderDelivered:\n          'http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}':\n            post:\n              deprecated: true\n              summary: Order delivered\n              description: A callback triggered every time an Order is delivered to the recipient\n              requestBody:\n                content:\n                  application/json:\n                    schema:\n                      type: object\n                      properties:\n                        orderId:\n                          type: string\n                          example: '123'\n                        timestamp:\n                          type: string\n                          format: date-time\n                          example: '2018-10-19T16:46:45Z'\n              responses:\n                '200':\n                  description: Callback successfully processed and no retries will be performed\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n        description: Created user object\n        required: true\n  '/user/{username}':\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: ''\n      operationId: getUserByName\n      parameters:\n        - name: username\n          in: path\n          description: 'The name that needs to be fetched. Use user1 for testing. '\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: successful operation\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n            application/xml:\n              schema:\n                $ref: '#/components/schemas/User'\n        '400':\n          description: Invalid username supplied\n        '404':\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        '400':\n          description: Invalid user supplied\n        '404':\n          description: User not found\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n        description: Updated user object\n        required: true\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          schema:\n            type: string\n      responses:\n        '400':\n          description: Invalid username supplied\n        '404':\n          description: User not found\n  /user/createWithArray:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: ''\n      operationId: createUsersWithArrayInput\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        $ref: '#/components/requestBodies/UserArray'\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: ''\n      operationId: createUsersWithListInput\n      responses:\n        default:\n          description: successful operation\n      requestBody:\n        $ref: '#/components/requestBodies/UserArray'\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: ''\n      operationId: loginUser\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          schema:\n            type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          schema:\n            type: string\n      responses:\n        '200':\n          description: successful operation\n          headers:\n            X-Rate-Limit:\n              description: calls per hour allowed by the user\n              schema:\n                type: integer\n                format: int32\n            X-Expires-After:\n              description: date in UTC when token expires\n              schema:\n                type: string\n                format: date-time\n          content:\n            application/json:\n              schema:\n                type: string\n              examples:\n                response:\n                  value: OK\n            application/xml:\n              schema:\n                type: string\n              examples:\n                response:\n                  value: <Message> OK </Message>\n            text/plain:\n              examples:\n                response:\n                  value: OK\n        '400':\n          description: Invalid username/password supplied\n  /user/logout:\n    get:\n      tags:\n        - user\n      summary: Logs out current logged in user session\n      description: ''\n      operationId: logoutUser\n      responses:\n        default:\n          description: successful operation\ncomponents:\n  schemas:\n    ApiResponse:\n      type: object\n      properties:\n        code:\n          type: integer\n          format: int32\n        type:\n          type: string\n        message:\n          type: string\n    Cat:\n      'x-tags': ['pet']\n      description: A representation of a cat\n      allOf:\n        - $ref: '#/components/schemas/Pet'\n        - type: object\n          properties:\n            huntingSkill:\n              type: string\n              description: The measured skill for hunting\n              default: lazy\n              example: adventurous\n              enum:\n                - clueless\n                - lazy\n                - adventurous\n                - aggressive\n          required:\n            - huntingSkill\n    Category:\n      type: object\n      properties:\n        id:\n          description: Category ID\n          allOf:\n            - $ref: '#/components/schemas/Id'\n        name:\n          description: Category name\n          type: string\n          minLength: 1\n        sub:\n          description: Test Sub Category\n          type: object\n          properties:\n            prop1:\n              type: string\n              description: Dumb Property\n      xml:\n        name: Category\n    Dog:\n      description: A representation of a dog\n      allOf:\n        - $ref: '#/components/schemas/Pet'\n        - type: object\n          properties:\n            packSize:\n              type: integer\n              format: int32\n              description: The size of the pack the dog is from\n              default: 1\n              minimum: 1\n          required:\n            - packSize\n    HoneyBee:\n      description: A representation of a honey bee\n      allOf:\n        - $ref: '#/components/schemas/Pet'\n        - type: object\n          properties:\n            honeyPerDay:\n              type: number\n              description: Average amount of honey produced per day in ounces\n              example: 3.14\n              multipleOf: .01\n          required:\n            - honeyPerDay\n    Id:\n      type: integer\n      format: int64\n      readOnly: true\n    Order:\n      type: object\n      properties:\n        id:\n          description: Order ID\n          allOf:\n            - $ref: '#/components/schemas/Id'\n        petId:\n          description: Pet ID\n          allOf:\n            - $ref: '#/components/schemas/Id'\n        quantity:\n          type: integer\n          format: int32\n          minimum: 1\n          default: 1\n        shipDate:\n          description: Estimated ship date\n          type: string\n          format: date-time\n        status:\n          type: string\n          description: Order Status\n          enum:\n            - placed\n            - approved\n            - delivered\n        complete:\n          description: Indicates whenever order was completed or not\n          type: boolean\n          default: false\n          readOnly: true\n        requestId:\n          description: Unique Request Id\n          type: string\n          writeOnly: true\n      xml:\n        name: Order\n    Pet:\n      type: object\n      required:\n        - name\n        - photoUrls\n      discriminator:\n        propertyName: petType\n        mapping:\n          cat: '#/components/schemas/Cat'\n          dog: '#/components/schemas/Dog'\n          bee: '#/components/schemas/HoneyBee'\n      properties:\n        id:\n          externalDocs:\n            description: 'Find more info here'\n            url: 'https://example.com'\n          description: Pet ID\n          allOf:\n            - $ref: '#/components/schemas/Id'\n        category:\n          description: Categories this pet belongs to\n          allOf:\n            - $ref: '#/components/schemas/Category'\n        name:\n          description: The name given to a pet\n          type: string\n          example: Guru\n        photoUrls:\n          description: The list of URL to a cute photos featuring pet\n          type: array\n          default: []\n          maxItems: 20\n          xml:\n            name: photoUrl\n            wrapped: true\n          items:\n            type: string\n            format: url\n        friend:\n          allOf:\n            - $ref: '#/components/schemas/Pet'\n        tags:\n          description: Tags attached to the pet\n          type: array\n          minItems: 1\n          xml:\n            name: tag\n            wrapped: true\n          items:\n            $ref: '#/components/schemas/Tag'\n        status:\n          type: string\n          description: Pet status in the store\n          enum:\n            - available\n            - pending\n            - sold\n          x-enumDescriptions:\n            available: Available status\n            pending: Pending status\n            sold: Sold status\n        petType:\n          description: Type of a pet\n          type: string\n      xml:\n        name: Pet\n    Tag:\n      type: object\n      properties:\n        id:\n          description: Tag ID\n          allOf:\n            - $ref: '#/components/schemas/Id'\n        name:\n          description: Tag name\n          type: string\n          minLength: 1\n      xml:\n        name: Tag\n    User:\n      type: object\n      properties:\n        id:\n          $ref: '#/components/schemas/Id'\n        pet:\n          oneOf:\n            - $ref: '#/components/schemas/Pet'\n            - $ref: '#/components/schemas/Tag'\n        username:\n          description: User supplied username\n          type: string\n          minLength: 4\n          example: John78\n        firstName:\n          description: User first name\n          type: string\n          minLength: 1\n          example: John\n        lastName:\n          description: User last name\n          type: string\n          minLength: 1\n          example: Smith\n        email:\n          description: User email address\n          type: string\n          format: email\n          example: john.smith@example.com\n        password:\n          type: string\n          description: >-\n            User password, MUST contain a mix of upper and lower case letters,\n            as well as digits\n          format: password\n          minLength: 8\n          pattern: '/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/'\n          example: drowssaP123\n        phone:\n          description: User phone number in international format\n          type: string\n          pattern: '/^\\+(?:[0-9]-?){6,14}[0-9]$/'\n          example: +1-202-555-0192\n        userStatus:\n          description: User status\n          type: integer\n          format: int32\n        addresses:\n          type: array\n          minItems: 0\n          maxLength: 10\n          items:\n            - type: object\n              properties:\n                city:\n                  type: string\n                  minLength: 0\n                country:\n                  type: string\n                  minLength: 0\n                street:\n                  description: includes build/apartment number\n                  type: string\n                  minLength: 0\n            - type: number\n          additionalItems:\n            type: string\n      xml:\n        name: User\n  requestBodies:\n    Pet:\n      content:\n        application/json:\n          schema:\n            allOf:\n              - description: My Pet\n                title: Pettie\n              - $ref: '#/components/schemas/Pet'\n        application/xml:\n          schema:\n            type: 'object'\n            properties:\n              name:\n                type: string\n                description: hooray\n                default: []\n      description: Pet object that needs to be added to the store\n      required: true\n    UserArray:\n      content:\n        application/json:\n          schema:\n            type: array\n            items:\n              $ref: '#/components/schemas/User'\n      description: List of user object\n      required: true\n  securitySchemes:\n    petstore_auth:\n      description: |\n        Get access to data while protecting your account credentials.\n        OAuth2 is also a safer and more secure way to give you access.\n      type: oauth2\n      flows:\n        implicit:\n          authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'\n          scopes:\n            'write:pets': modify pets in your account\n            'read:pets': read your pets\n    api_key:\n      description: >\n        For this sample, you can use the api key `special-key` to test the\n        authorization filters.\n      type: apiKey\n      name: api_key\n      in: header\n  examples:\n    Order:\n      value:\n        quantity: 1\n        shipDate: '2018-10-19T16:46:45Z'\n        status: placed\n        complete: false\nx-webhooks:\n  newPet:\n    post:\n      summary: New pet\n      description: Information about a new pet in the systems\n      operationId: newPet\n      tags:\n        - pet\n      requestBody:\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/Pet'\n      responses:\n        '200':\n          description: Return a 200 status to indicate that the data was received successfully\n"
  },
  {
    "path": "demo/playground/hmr-playground.tsx",
    "content": "import * as React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport type { RedocRawOptions } from '../../src/services/RedocNormalizedOptions';\nimport { RedocStandalone } from '../../src';\n\nconst big = window.location.search.indexOf('big') > -1;\nconst swagger = window.location.search.indexOf('swagger') > -1;\n\nconst userUrl = window.location.search.match(/url=(.*)$/);\n\nconst specUrl =\n  (userUrl && userUrl[1]) || (swagger ? 'museum.yaml' : big ? 'big-openapi.json' : 'museum.yaml');\n\nconst options: RedocRawOptions = {\n  nativeScrollbars: false,\n  maxDisplayedEnumValues: 3,\n  schemaDefinitionsTagName: 'schemas',\n};\n\nconst container = document.getElementById('example');\nconst root = createRoot(container!);\nroot.render(<RedocStandalone specUrl={specUrl} options={options} />);\n"
  },
  {
    "path": "demo/playground/index.html",
    "content": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <title>Redoc</title>\n    <style>\n      body {\n        margin: 0;\n        padding: 0;\n      }\n\n      redoc {\n        display: block;\n      }\n    </style>\n    <link\n      href=\"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700\"\n      rel=\"stylesheet\"\n    />\n  </head>\n\n  <body>\n    <redoc id=\"example\"></redoc>\n  </body>\n</html>\n"
  },
  {
    "path": "demo/ssr/index.ts",
    "content": "import { renderToString } from 'react-dom/server';\nimport * as React from 'react';\nimport { ServerStyleSheet } from 'styled-components';\nimport { Redoc, createStore } from '../../';\nimport { readFileSync } from 'fs';\nimport { resolve } from 'path';\n\nconst yaml = require('js-yaml');\nconst http = require('http');\nconst fs = require('fs');\n\nconst PORT = 9999;\n\nconst server = http.createServer(async (request, response) => {\n  console.time('request ' + request.url);\n  if (request.url === '/redoc.standalone.js') {\n    fs.createReadStream('bundles/redoc.standalone.js', 'utf8').pipe(response);\n  } else if (request.url === '/') {\n    const spec = yaml.load(readFileSync(resolve(__dirname, '../openapi.yaml'), 'utf-8'));\n    const store = await createStore(spec, 'path/to/spec.yaml');\n\n    const sheet = new ServerStyleSheet();\n\n    const html = renderToString(sheet.collectStyles(React.createElement(Redoc, { store })));\n    const css = sheet.getStyleTags();\n\n    const res = `<html>\n    <head>\n      <meta charset=\"utf8\" />\n      <title>ReDoc</title>\n      <!-- needed for adaptive design -->\n      <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n      <style>\n        body {\n          padding: 0;\n          margin: 0;\n        }\n      </style>\n      <script src=\"redoc.standalone.js\"></script>\n      <link href=\"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700\" rel=\"stylesheet\">\n      ${css}\n    </head>\n    <body>\n    <script>\n        document.addEventListener('DOMContentLoaded', function() {\n          const state = ${JSON.stringify(await store.toJS())};\n          Redoc.hydrate(state, document.getElementById('redoc'));\n        });\n        </script>\n      <div id=\"redoc\">${html}</div>\n    </body>\n    </html>`;\n    response.writeHead(200, { 'Content-Length': res.length });\n    response.write(res);\n    response.end();\n  } else {\n    response.writeHead(404);\n    response.write('Not found');\n    response.end();\n  }\n\n  console.timeEnd('request ' + request.url);\n});\n\nserver.listen(PORT, () => console.log(`Server started: http://127.0.0.1:${PORT}`));\n"
  },
  {
    "path": "demo/swagger.yaml",
    "content": "swagger: '2.0'\nschemes:\n  - http\n  - https\nhost: petstore.swagger.io\nbasePath: /v2\ninfo:\n  description: |\n    This is a sample server Petstore server.\n    You can find out more about Swagger at\n    [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).\n    For this sample, you can use the api key `special-key` to test the authorization filters.\n    # Introduction\n    This API is documented in **OpenAPI format** and is based on\n    [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\n    It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\n    tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\n    OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md).\n    # OpenAPI Specification\n    This API is documented in **OpenAPI format** and is based on\n    [Petstore sample](http://petstore.swagger.io/) provided by [swagger.io](http://swagger.io) team.\n    It was **extended** to illustrate features of [generator-openapi-repo](https://github.com/Rebilly/generator-openapi-repo)\n    tool and [ReDoc](https://github.com/Redocly/redoc) documentation. In addition to standard\n    OpenAPI syntax we use a few [vendor extensions](https://github.com/Redocly/redoc/blob/main/docs/redoc-vendor-extensions.md).\n    # Cross-Origin Resource Sharing\n    This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with  [W3C spec](https://www.w3.org/TR/cors/).\n    And that allows cross-domain communication from the browser.\n    All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.\n    # Authentication\n    Petstore offers two forms of authentication:\n      - API Key\n      - OAuth2\n\n    OAuth2 - an open protocol to allow secure authorization in a simple\n    and standard method from web, mobile and desktop applications.\n    <!-- ReDoc-Inject: <security-definitions> -->\n  version: 1.0.0\n  title: Swagger Petstore\n  termsOfService: 'http://swagger.io/terms/'\n  contact:\n    email: apiteam@swagger.io\n    url: https://github.com/Redocly/redoc\n  x-logo:\n    url: 'https://redocly.github.io/redoc/petstore-logo.png'\n    altText: Petstore logo\n  license:\n    name: Apache 2.0\n    url: 'http://www.apache.org/licenses/LICENSE-2.0.html'\nexternalDocs:\n  description: Find out how to create Github repo for your OpenAPI spec.\n  url: 'https://github.com/Rebilly/generator-openapi-repo'\ntags:\n  - name: pet\n    description: Everything about your Pets\n  - name: store\n    description: Access to Petstore orders\n  - name: user\n    description: Operations about user\nx-tagGroups:\n  - name: General\n    tags:\n      - pet\n      - store\n  - name: User Management\n    tags:\n      - user\nsecurityDefinitions:\n  petstore_auth:\n    description: |\n      Get access to data while protecting your account credentials.\n      OAuth2 is also a safer and more secure way to give you access.\n    type: oauth2\n    authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'\n    flow: implicit\n    scopes:\n      'write:pets': modify pets in your account\n      'read:pets': read your pets\n  api_key:\n    description: |\n      For this sample, you can use the api key `special-key` to test the authorization filters.\n    type: apiKey\n    name: api_key\n    in: header\nx-servers:\n  - url: //petstore.swagger.io/v2\n    description: Default server\n  - url: //petstore.swagger.io/sandbox\n    description: Sandbox server\npaths:\n  /pet:\n    post:\n      tags:\n        - pet\n      summary: Add a new pet to the store\n      description: Add new pet to the store inventory.\n      operationId: addPet\n      consumes:\n        - application/json\n        - application/xml\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - in: body\n          name: body\n          description: Pet object that needs to be added to the store\n          required: true\n          schema:\n            $ref: '#/definitions/Pet'\n      responses:\n        '405':\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      x-code-samples:\n        - lang: 'C#'\n          source: |\n            PetStore.v1.Pet pet = new PetStore.v1.Pet();\n            pet.setApiKey(\"your api key\");\n            pet.petType = PetStore.v1.Pet.TYPE_DOG;\n            pet.name = \"Rex\";\n            // set other fields\n            PetStoreResponse response = pet.create();\n            if (response.statusCode == HttpStatusCode.Created)\n            {\n              // Successfully created\n            }\n            else\n            {\n              // Something wrong -- check response for errors\n              Console.WriteLine(response.getRawResponse());\n            }\n        - lang: PHP\n          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\"\n    put:\n      tags:\n        - pet\n      summary: Update an existing pet\n      description: ''\n      operationId: updatePet\n      consumes:\n        - application/json\n        - application/xml\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - in: body\n          name: body\n          description: Pet object that needs to be added to the store\n          required: true\n          schema:\n            $ref: '#/definitions/Pet'\n      responses:\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Pet not found\n        '405':\n          description: Validation exception\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n      x-code-samples:\n        - lang: PHP\n          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\"\n  '/pet/{petId}':\n    get:\n      tags:\n        - pet\n      summary: Find pet by ID\n      description: Returns a single pet\n      operationId: getPetById\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet to return\n          required: true\n          type: integer\n          format: int64\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            $ref: '#/definitions/Pet'\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Pet not found\n      security:\n        - api_key: []\n    post:\n      tags:\n        - pet\n      summary: Updates a pet in the store with form data\n      description: ''\n      operationId: updatePetWithForm\n      consumes:\n        - application/x-www-form-urlencoded\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet that needs to be updated\n          required: true\n          type: integer\n          format: int64\n        - name: name\n          in: formData\n          description: Updated name of the pet\n          required: false\n          type: string\n        - name: status\n          in: formData\n          description: Updated status of the pet\n          required: false\n          type: string\n      responses:\n        '405':\n          description: Invalid input\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n    delete:\n      tags:\n        - pet\n      summary: Deletes a pet\n      description: ''\n      operationId: deletePet\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: api_key\n          in: header\n          required: false\n          type: string\n          x-example: Bearer <TOKEN>\n        - name: petId\n          in: path\n          description: Pet id to delete\n          required: true\n          type: integer\n          format: int64\n      responses:\n        '400':\n          description: Invalid pet value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  '/pet/{petId}/uploadImage':\n    post:\n      tags:\n        - pet\n      summary: uploads an image\n      description: ''\n      operationId: uploadFile\n      consumes:\n        - multipart/form-data\n      produces:\n        - application/json\n      parameters:\n        - name: petId\n          in: path\n          description: ID of pet to update\n          required: true\n          type: integer\n          format: int64\n        - name: additionalMetadata\n          in: formData\n          description: Additional data to pass to server\n          required: false\n          type: string\n        - name: file\n          in: formData\n          description: file to upload\n          required: false\n          type: file\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            $ref: '#/definitions/ApiResponse'\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  /pet/findByStatus:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by status\n      description: Multiple status values can be provided with comma separated strings\n      operationId: findPetsByStatus\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: status\n          in: query\n          description: Status values that need to be considered for filter\n          required: true\n          type: array\n          items:\n            type: string\n            enum:\n              - available\n              - pending\n              - sold\n            default: available\n          collectionFormat: csv\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            type: array\n            items:\n              $ref: '#/definitions/Pet'\n        '400':\n          description: Invalid status value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  /pet/findByTags:\n    get:\n      tags:\n        - pet\n      summary: Finds Pets by tags\n      description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.'\n      operationId: findPetsByTags\n      deprecated: true\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: tags\n          in: query\n          description: Tags to filter by\n          required: true\n          type: array\n          items:\n            type: string\n          collectionFormat: csv\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            type: array\n            items:\n              $ref: '#/definitions/Pet'\n        '400':\n          description: Invalid tag value\n      security:\n        - petstore_auth:\n            - 'write:pets'\n            - 'read:pets'\n  /store/inventory:\n    get:\n      tags:\n        - store\n      summary: Returns pet inventories by status\n      description: Returns a map of status codes to quantities\n      operationId: getInventory\n      produces:\n        - application/json\n      parameters: []\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            type: object\n            additionalProperties:\n              type: integer\n              format: int32\n      security:\n        - api_key: []\n  /store/order:\n    post:\n      tags:\n        - store\n      summary: Place an order for a pet\n      description: ''\n      operationId: placeOrder\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - in: body\n          name: body\n          description: order placed for purchasing the pet\n          required: true\n          schema:\n            $ref: '#/definitions/Order'\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            $ref: '#/definitions/Order'\n        '400':\n          description: Invalid Order\n  '/store/order/{orderId}':\n    get:\n      tags:\n        - store\n      summary: Find purchase order by ID\n      description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions'\n      operationId: getOrderById\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: orderId\n          in: path\n          description: ID of pet that needs to be fetched\n          required: true\n          type: integer\n          maximum: 5\n          minimum: 1\n          format: int64\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            $ref: '#/definitions/Order'\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Order not found\n    delete:\n      tags:\n        - store\n      summary: Delete purchase order by ID\n      description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\n      operationId: deleteOrder\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: orderId\n          in: path\n          description: ID of the order that needs to be deleted\n          required: true\n          type: string\n          minimum: 1\n      responses:\n        '400':\n          description: Invalid ID supplied\n        '404':\n          description: Order not found\n  /user:\n    post:\n      tags:\n        - user\n      summary: Create user\n      description: This can only be done by the logged in user.\n      operationId: createUser\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - in: body\n          name: body\n          description: Created user object\n          required: true\n          schema:\n            $ref: '#/definitions/User'\n      responses:\n        default:\n          description: successful operation\n  '/user/{username}':\n    get:\n      tags:\n        - user\n      summary: Get user by user name\n      description: ''\n      operationId: getUserByName\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: username\n          in: path\n          description: 'The name that needs to be fetched. Use user1 for testing. '\n          required: true\n          type: string\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            $ref: '#/definitions/User'\n        '400':\n          description: Invalid username supplied\n        '404':\n          description: User not found\n    put:\n      tags:\n        - user\n      summary: Updated user\n      description: This can only be done by the logged in user.\n      operationId: updateUser\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: username\n          in: path\n          description: name that need to be deleted\n          required: true\n          type: string\n        - in: body\n          name: body\n          description: Updated user object\n          required: true\n          schema:\n            $ref: '#/definitions/User'\n      responses:\n        '400':\n          description: Invalid user supplied\n        '404':\n          description: User not found\n    delete:\n      tags:\n        - user\n      summary: Delete user\n      description: This can only be done by the logged in user.\n      operationId: deleteUser\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: username\n          in: path\n          description: The name that needs to be deleted\n          required: true\n          type: string\n      responses:\n        '400':\n          description: Invalid username supplied\n        '404':\n          description: User not found\n  /user/createWithArray:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: ''\n      operationId: createUsersWithArrayInput\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - in: body\n          name: body\n          description: List of user object\n          required: true\n          schema:\n            type: array\n            items:\n              $ref: '#/definitions/User'\n      responses:\n        default:\n          description: successful operation\n  /user/createWithList:\n    post:\n      tags:\n        - user\n      summary: Creates list of users with given input array\n      description: ''\n      operationId: createUsersWithListInput\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - in: body\n          name: body\n          description: List of user object\n          required: true\n          schema:\n            type: array\n            items:\n              $ref: '#/definitions/User'\n      responses:\n        default:\n          description: successful operation\n  /user/login:\n    get:\n      tags:\n        - user\n      summary: Logs user into the system\n      description: ''\n      operationId: loginUser\n      produces:\n        - application/xml\n        - application/json\n      parameters:\n        - name: username\n          in: query\n          description: The user name for login\n          required: true\n          type: string\n        - name: password\n          in: query\n          description: The password for login in clear text\n          required: true\n          type: string\n      responses:\n        '200':\n          description: successful operation\n          schema:\n            type: string\n          examples:\n            application/json: OK\n            application/xml: <message> OK </message>\n            text/plain: OK\n          headers:\n            X-Rate-Limit:\n              type: integer\n              format: int32\n              description: calls per hour allowed by the user\n            X-Expires-After:\n              type: string\n              format: date-time\n              description: date in UTC when token expires\n        '400':\n          description: Invalid username/password supplied\n  /user/logout:\n    get:\n      tags:\n        - user\n      summary: Logs out current logged in user session\n      description: ''\n      operationId: logoutUser\n      produces:\n        - application/xml\n        - application/json\n      parameters: []\n      responses:\n        default:\n          description: successful operation\ndefinitions:\n  ApiResponse:\n    type: object\n    properties:\n      code:\n        type: integer\n        format: int32\n      type:\n        type: string\n      message:\n        type: string\n  Cat:\n    description: A representation of a cat\n    allOf:\n      - $ref: '#/definitions/Pet'\n      - type: object\n        properties:\n          huntingSkill:\n            type: string\n            description: The measured skill for hunting\n            default: lazy\n            enum:\n              - clueless\n              - lazy\n              - adventurous\n              - aggressive\n        required:\n          - huntingSkill\n  Category:\n    type: object\n    properties:\n      id:\n        description: Category ID\n        allOf:\n          - $ref: '#/definitions/Id'\n      name:\n        description: Category name\n        type: string\n        minLength: 1\n      sub:\n        description: Test Sub Category\n        type: object\n        properties:\n          prop1:\n            type: string\n            description: Dumb Property\n    xml:\n      name: Category\n  Dog:\n    description: A representation of a dog\n    allOf:\n      - $ref: '#/definitions/Pet'\n      - type: object\n        properties:\n          packSize:\n            type: integer\n            format: int32\n            description: The size of the pack the dog is from\n            default: 1\n            minimum: 1\n        required:\n          - packSize\n  HoneyBee:\n    description: A representation of a honey bee\n    allOf:\n      - $ref: '#/definitions/Pet'\n      - type: object\n        properties:\n          honeyPerDay:\n            type: number\n            description: Average amount of honey produced per day in ounces\n            example: 3.14\n        required:\n          - honeyPerDay\n  Id:\n    type: integer\n    format: int64\n  Order:\n    type: object\n    properties:\n      id:\n        description: Order ID\n        allOf:\n          - $ref: '#/definitions/Id'\n      petId:\n        description: Pet ID\n        allOf:\n          - $ref: '#/definitions/Id'\n      quantity:\n        type: integer\n        format: int32\n        minimum: 1\n        default: 1\n      shipDate:\n        description: Estimated ship date\n        type: string\n        format: date-time\n      status:\n        type: string\n        description: Order Status\n        enum:\n          - placed\n          - approved\n          - delivered\n      complete:\n        description: Indicates whenever order was completed or not\n        type: boolean\n        default: false\n    xml:\n      name: Order\n  Pet:\n    type: object\n    required:\n      - name\n      - photoUrls\n    discriminator: petType\n    properties:\n      id:\n        description: Pet ID\n        allOf:\n          - $ref: '#/definitions/Id'\n      category:\n        description: Categories this pet belongs to\n        allOf:\n          - $ref: '#/definitions/Category'\n      name:\n        description: The name given to a pet\n        type: string\n        example: Guru\n      photoUrls:\n        description: The list of URL to a cute photos featuring pet\n        type: array\n        default: []\n        xml:\n          name: photoUrl\n          wrapped: true\n        items:\n          type: string\n          format: url\n      tags:\n        description: Tags attached to the pet\n        type: array\n        xml:\n          name: tag\n          wrapped: true\n        items:\n          $ref: '#/definitions/Tag'\n      status:\n        type: string\n        description: Pet status in the store\n        enum:\n          - available\n          - pending\n          - sold\n      petType:\n        description: Type of a pet\n        type: string\n    xml:\n      name: Pet\n  Tag:\n    type: object\n    properties:\n      id:\n        description: Tag ID\n        allOf:\n          - $ref: '#/definitions/Id'\n      name:\n        description: Tag name\n        type: string\n        minLength: 1\n    xml:\n      name: Tag\n  User:\n    type: object\n    properties:\n      id:\n        description: User ID\n        $ref: '#/definitions/Id'\n      username:\n        description: User supplied username\n        type: string\n        minLength: 4\n        example: John78\n      firstName:\n        description: User first name\n        type: string\n        minLength: 1\n        example: John\n      lastName:\n        description: User last name\n        type: string\n        minLength: 1\n        example: Smith\n      email:\n        description: User email address\n        type: string\n        format: email\n        example: john.smith@example.com\n      password:\n        type: string\n        description: 'User password, MUST contain a mix of upper and lower case letters, as well as digits'\n        format: password\n        minLength: 8\n        pattern: '(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])'\n        example: drowssaP123\n      phone:\n        description: User phone number in international format\n        type: string\n        pattern: \"^\\\\+(?:[0-9]-?){6,14}[0-9]$\"\n        example: +1-202-555-0192\n        x-nullable: true\n      userStatus:\n        description: User status\n        type: integer\n        format: int32\n    xml:\n      name: User\n"
  },
  {
    "path": "demo/webpack.config.ts",
    "content": "import * as CopyWebpackPlugin from 'copy-webpack-plugin';\nimport ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');\nimport * as HtmlWebpackPlugin from 'html-webpack-plugin';\nimport { resolve } from 'path';\nimport * as webpack from 'webpack';\nimport { webpackIgnore } from '../config/webpack-utils';\n\nconst VERSION = JSON.stringify(require('../package.json').version);\nconst REVISION = JSON.stringify(\n  require('child_process').execSync('git rev-parse --short HEAD').toString().trim(),\n);\n\nfunction root(filename) {\n  return resolve(__dirname + '/' + filename);\n}\n\nexport default (env: { playground?: boolean; bench?: boolean } = {}) => ({\n  entry: [\n    root('../src/polyfills.ts'),\n    root(\n      env.playground\n        ? 'playground/hmr-playground.tsx'\n        : env.bench\n        ? '../benchmark/index.tsx'\n        : 'index.tsx',\n    ),\n  ],\n  target: 'web',\n  output: {\n    filename: 'redoc-demo.bundle.js',\n    path: root('dist'),\n    globalObject: 'this',\n  },\n\n  devServer: {\n    static: __dirname,\n    port: 9090,\n    hot: true,\n    historyApiFallback: true,\n    open: true,\n  },\n  stats: {\n    children: true,\n  },\n  resolve: {\n    extensions: ['.ts', '.tsx', '.js', '.json'],\n    fallback: {\n      path: require.resolve('path-browserify'),\n      buffer: require.resolve('buffer'),\n      http: false,\n      fs: false,\n      os: false,\n    },\n  },\n\n  performance: false,\n\n  externals: {\n    esprima: 'esprima',\n    'node-fetch': 'null',\n    'node-fetch-h2': 'null',\n    yaml: 'null',\n    'safe-json-stringify': 'null',\n  },\n\n  module: {\n    rules: [\n      { test: [/\\.eot$/, /\\.gif$/, /\\.woff$/, /\\.svg$/, /\\.ttf$/], use: 'null-loader' },\n      {\n        test: /\\.(tsx?|[cm]?js)$/,\n        loader: 'esbuild-loader',\n        options: {\n          target: 'es2015',\n          tsconfigRaw: require('../tsconfig.json'),\n        },\n        exclude: [/node_modules/],\n      },\n      {\n        test: /\\.css$/,\n        use: [\n          'style-loader',\n          'css-loader',\n          {\n            loader: 'esbuild-loader',\n            options: {\n              minify: true,\n            },\n          },\n        ],\n      },\n    ],\n  },\n  plugins: [\n    new webpack.DefinePlugin({\n      __REDOC_VERSION__: VERSION,\n      __REDOC_REVISION__: REVISION,\n      'process.env': '{}',\n      'process.platform': '\"browser\"',\n      'process.stdout': 'null',\n    }),\n    // new webpack.NamedModulesPlugin(),\n    // new webpack.optimize.ModuleConcatenationPlugin(),\n    new HtmlWebpackPlugin({\n      template: env.playground\n        ? 'demo/playground/index.html'\n        : env.bench\n        ? 'benchmark/index.html'\n        : 'demo/index.html',\n    }),\n    new webpack.ProvidePlugin({\n      Buffer: ['buffer', 'Buffer'],\n    }),\n    new ForkTsCheckerWebpackPlugin({ logger: { infrastructure: 'silent', issues: 'console' } }),\n    webpackIgnore(/js-yaml\\/dumper\\.js$/),\n    webpackIgnore(/json-schema-ref-parser\\/lib\\/dereference\\.js/),\n    webpackIgnore(/^\\.\\/SearchWorker\\.worker$/),\n    new CopyWebpackPlugin({\n      patterns: ['demo/museum.yaml'],\n    }),\n  ],\n});\n"
  },
  {
    "path": "docs/config.md",
    "content": "# Configure Redoc\n\nGetting your documentation just right is important, and Redoc comes with many configuration options to help you succeed in that mission.\n\nEach deployment type has documentation on how to configure options for that type of Redoc project. This page lists all the options you can use with Redoc.\n\n**Versions: 2.x**\n\n{% admonition type=\"success\" name=\"Client-side configuration\" %}\n\nUsing Redoc as a standalone (HTML or React) tool, these options must be presented in [kebab case](https://en.wikipedia.org/wiki/Letter_case#Kebab_case).\nFor example, `scrollYOffset` becomes `scroll-y-offset`, and `expandResponses` becomes `expand-responses`.\n\n{% /admonition %}\n\n## Functional settings\n\n\n### disableSearch\n\nDisables search indexing and hides the search box from the API documentation page.\n\n### minCharacterLengthToInitSearch\n\nSets the minimum amount of characters that need to be typed into the search dialog to initiate the search.\n\n_Default: 3_\n\n### hideDownloadButtons\n\nHides the 'Download' button for saving the API definition source file. **This setting does not make the API definition private**; it just hides the button.\n\n### hideLoading\n\nHides the loading animation. Does not apply to CLI or Workflows-rendered docs.\n\n### hideSchemaTitles\n\nHides the schema title next to to the type.\n\n### jsonSamplesExpandLevel\n\nSets the default expand level for JSON payload samples (response and request body). The default value is 2, and the maximum supported value is '+Infinity'. It can also be configured as a string with the special value `all` that expands all levels.\n\n_Default: 2_\n\n### maxDisplayedEnumValues\n\nDisplays only the specified number of enum values. The remaining values are hidden in an expandable area. If not set, all values are displayed.\n\n### onlyRequiredInSamples\n\nShows only required fields in request samples.\n\n### sortRequiredPropsFirst\n\nShows required properties in schemas first, ordered in the same order as in the required array.\n\n### schemasExpansionLevel\n\nSpecifies whether to automatically expand schemas in Reference docs. Set it to `all` to expand all schemas regardless of their level, or set it to a number to expand schemas up to the specified level. For example, `schemasExpansionLevel: 3` expands schemas up to three levels deep. The default value is `0`, meaning no schemas are expanded automatically.\n\n### scrollYOffset\n\nSpecifies a vertical scroll-offset.\nThis setting is useful when there are fixed positioned elements at the top of the page, such as navbars, headers, etc.\n\nNote that you can specify the `scrollYOffset` value in any of the following ways:\n- as a number - a fixed number of pixels to be used as the offset.\n- as a CSS selector - the selector of the element to be used for specifying the offset. The distance from the top of the page to the element's bottom is used as the offset.\n- a function (advanced) - a getter function. Must return a number representing the offset (in pixels).\n\n### showExtensions\n\nShows specification extensions ('x-' fields). Extensions used by Redoc are ignored. The value can be boolean or an array of strings with names of extensions to display. When used as boolean and set to `true`, all specification extensions are shown.\n\n### sanitize\n\nIf set to `true`, the API definition is considered untrusted and all HTML/Markdown is sanitized to prevent XSS.\n\n### downloadUrls\n\nSet the URLs used to download the OpenAPI description or other documentation related files from the API documentation page.\n\n### schemaDefinitionsTagName\n\nIf a value is set, all of the schemas are rendered with the designated tag name. The schemas then render and display in the sidebar navigation (with that associated tag name).\n\n### generatedSamplesMaxDepth\n\nThe generatedSamplesMaxDepth option controls how many schema levels automatically generated for payload samples. The default is 8 which works well for most APIs, but you can adjust it if necessary for your use case.\n\n### hidePropertiesPrefix\n\nIn complex data structures or object schemas where properties are nested within parent objects the hidePropertiesPrefix option enables the hiding of parent names for nested properties within the documentation.\n\n_Default: true_\n\n## Deprecated Functional settings\n\n### hideDownloadButton\n\nHides the 'Download' button for saving the API definition source file. **This setting does not make the API definition private**; it just hides the button.\n\n### downloadFileName\n\nSets the filename for the downloaded API definition source file.\n\n### downloadDefinitionUrl\n\nSets the URL for the downloaded API definition source file.\n\n### requiredPropsFirst\n\nShows required properties in schemas first, ordered in the same order as in the required array.\n\n### jsonSampleExpandLevel\n\nSets the default expand level for JSON payload samples (response and request body). The default value is 2, and the maximum supported value is '+Infinity'. It can also be configured as a string with the special value `all` that expands all levels.\n\n_Default: 2_\n\n### schemaExpansionLevel\n\nSpecifies whether to automatically expand schemas in Reference docs. Set it to `all` to expand all schemas regardless of their level, or set it to a number to expand schemas up to the specified level. For example, `schemaExpansionLevel: 3` expands schemas up to three levels deep. The default value is `0`, meaning no schemas are expanded automatically.\n\n\n### expandDefaultServerVariables\n\nEnables or disables expanding default server variables.\n\n### expandResponses\n\nControls which responses to expand by default. Specify one or more responses by providing their response codes as a comma-separated list without spaces, for example `expandResponses='200,201'`. Special value 'all' expands all responses by default. Be careful: this option can slow down documentation rendering time.\n\n### expandSingleSchemaField\n\nAutomatically expands the single field in a schema.\n\n### hideHostname\n\nIf set to `true`, the protocol and hostname are not shown in the operation definition.\n\n### hideRequestPayloadSample\n\nHides request payload examples.\n\n### hideOneOfDescription\n\nIf set to `true`, the description for `oneOf`/`anyOf` object is not shown in the schema.\n\n### hideSchemaPattern\n\nIf set to `true`, the pattern is not shown in the schema.\n\n### hideSecuritySection\n\nHides the Security panel section.\n\n### hideSingleRequestSampleTab\n\nHides the request sample tab for requests with only one sample.\n\n### menuToggle\n\nIf set to `true`, selecting an expanded item in the sidebar twice collapses it.\n\n_Default: true_\n\n### nativeScrollbars\n\nIf set to `true`, the sidebar uses the native scrollbar instead of perfect-scroll. This setting is a scrolling performance optimization for big API definitions.\n\n### pathInMiddlePanel\n\nShows the path link and HTTP verb in the middle panel instead of the right panel.\n\n### payloadSampleIdx\n\nIf set, the payload sample is inserted at the specified index. If there are `N` payload samples and the value configured here is bigger than `N`, the payload sample is inserted last. Indexes start from 0.\n\n### showObjectSchemaExamples\n\nShows object schema example in the properties; default `false`.\n\n### showWebhookVerb\n\nWhen set to `true`, shows the HTTP request method for webhooks in operations and in the sidebar.\n\n### simpleOneOfTypeLabel\n\nShows only unique `oneOf` types in the label without titles.\n\n### sortEnumValuesAlphabetically\n\nWhen set to `true`, sorts all enum values in all schemas alphabetically.\n\n### sortOperationsAlphabetically\n\nWhen set to `true`, sorts operations in the navigation sidebar and in the middle panel alphabetically.\n\n### sortPropsAlphabetically\n\nWhen set to `true`, sorts properties in all schemas alphabetically.\n\n### sortTagsAlphabetically\n\nWhen set to true, sorts tags in the navigation sidebar and in the middle panel alphabetically. Note that only tags are sorted alphabetically in the middle panel, not the operations associated with each tag. To sort operations alphabetically as well, you must set the `sortOperationsAlphabetically` setting to `true`.\n\n_Default: false_\n\n### untrustedSpec\n\nIf set to `true`, the API definition is considered untrusted and all HTML/Markdown is sanitized to prevent XSS.\n\n## Theme settings\nChange styles for the API documentation page. **Supported in Redoc CE 2.x**.\n* `spacing`\n  * `unit`: 5 # main spacing unit used in autocomputed theme values later\n  * `sectionHorizontal`: 40 # Horizontal section padding. COMPUTED: spacing.unit * 8\n  * `sectionVertical`: 40 # Horizontal section padding. COMPUTED: spacing.unit * 8\n* `breakpoints` # breakpoints for switching three/two and mobile view layouts\n  * `small`: '50rem'\n  * `medium`: '85rem'\n  * `large`: '105rem'\n* `colors`\n  * `tonalOffset`: 0.3 # default tonal offset used in computations\n* `typography`\n  * `fontSize`: '14px'\n  * `lineHeight`: '1.5em'\n  * `fontWeightRegular`: '400'\n  * `fontWeightBold`: '600'\n  * `fontWeightLight`: '300'\n  * `fontFamily`: 'Roboto, sans-serif'\n  * `smoothing`: 'antialiased'\n  * `optimizeSpeed`: true\n  * `headings`\n    * `fontFamily`: 'Montserrat, sans-serif'\n    * `fontWeight`: '400'\n    * `lineHeight`: '1.6em'\n  * `code` # inline code styling\n    * `fontSize`: '13px'\n    * `fontFamily`: 'Courier, monospace'\n    * `lineHeight`: # COMPUTED: typography.lineHeight\n    * `fontWeight`: # COMPUTED: typography.fontWeightRegular\n    * `color`: '#e53935'\n    * `backgroundColor`: 'rgba(38, 50, 56, 0.05)'\n    * `wrap`: false # whether to break word for inline blocks (otherwise they can overflow)\n  * `links`\n    * `color`: # COMPUTED: colors.primary.main\n    * `visited`: # COMPUTED: typography.links.color\n    * `hover`: # COMPUTED: lighten(0.2 typography.links.color)\n    * `textDecoration`: 'auto'\n    * `hoverTextDecoration`: 'auto'\n* `sidebar`\n  * `width`: '260px'\n  * `backgroundColor`: '#fafafa'\n  * `textColor`: '#333333'\n  * `activeTextColor`: # COMPUTED: theme.sidebar.textColor (if set by user) or theme.colors.primary.main\n  * `groupItems` # Group headings\n    * `activeBackgroundColor`: # COMPUTED: theme.sidebar.backgroundColor\n    * `activeTextColor`: # COMPUTED: theme.sidebar.activeTextColor\n    * `textTransform`: 'uppercase'\n  * `level1Items` # Level 1 items like tags or section 1st level items\n    * `activeBackgroundColor`: # COMPUTED: theme.sidebar.backgroundColor\n    * `activeTextColor`: # COMPUTED: theme.sidebar.activeTextColor\n    * `textTransform`: 'none'\n  * `arrow` # sidebar arrow\n    * `size`: '1.5em'\n    * `color`: # COMPUTED: theme.sidebar.textColor\n* `logo`\n  * `maxHeight`: # COMPUTED: sidebar.width\n  * `maxWidth`: # COMPUTED: sidebar.width\n  * `gutter`: '2px' # logo image padding\n* `rightPanel`\n  * `backgroundColor`: '#263238'\n  * `width`: '40%'\n  * `textColor`: '#ffffff'\n  * `servers`\n    * `overlay`\n      * `backgroundColor`: '#fafafa'\n      * `textColor`: '#263238'\n    * `url`\n      * `backgroundColor`: '#fff'\n* `fab`\n  * `backgroundColor`: '#263238'\n  * `color`: '#ffffff'\n\n## Additional customization\n\n### Security Definition location\n\nYou can inject the Security Definitions widget into any place in your definition `description`.\nFor more information, refer to [Security definitions injection](./security-definitions-injection.md).\n\n### OpenAPI specification extensions\n\nRedoc uses the following [specification extensions](https://redocly.com/docs-legacy/api-reference-docs/spec-extensions/):\n* [`x-logo`](./redoc-vendor-extensions.md#x-logo) - is used to specify API logo\n* [`x-traitTag`](./redoc-vendor-extensions.md#x-traittag) - useful for handling out common things like Pagination, Rate-Limits, etc\n* [`x-codeSamples`](./redoc-vendor-extensions.md#x-codesamples) - specify operation code samples\n* [`x-examples`](./redoc-vendor-extensions.md#x-examples) - specify JSON example for requests\n* [`x-nullable`](./redoc-vendor-extensions.md#x-nullable) - mark schema param as a nullable\n* [`x-displayName`](./redoc-vendor-extensions.md#x-displayname) - specify human-friendly names for the menu categories\n* [`x-tagGroups`](./redoc-vendor-extensions.md#x-taggroups) - group tags by categories in the side menu\n* [`x-servers`](./redoc-vendor-extensions.md#x-servers) - ability to specify different servers for API (backported from OpenAPI 3.0)\n* [`x-additionalPropertiesName`](./redoc-vendor-extensions.md#x-additionalpropertiesname) - ability to supply a descriptive name for the additional property keys\n* [`x-summary`](./redoc-vendor-extensions.md#x-summary) - For Response object, use as the response button text, with description rendered under the button\n* [`x-explicitMappingOnly`](./redoc-vendor-extensions.md#x-explicitmappingonly) - In Schemas, display a more descriptive property name in objects with additionalProperties when viewing the property list with an object\n\n\n"
  },
  {
    "path": "docs/deployment/cli.md",
    "content": "---\nseo:\n  title: Use the Redoc CLI\n---\n\n# How to use the Redocly CLI\n\nWith Redocly CLI, you can bundle your OpenAPI definition and API documentation\n(made with Redoc) into an HTML file and render it locally.\n\n## Step 1 - Install Redocly CLI\n\nFirst, you need to install the `@redocly/cli` package.\n\nYou can install it [globally](../../cli/installation#install-globally) using npm.\n\nOr you can install it during [runtime](../../cli/installation#use-npx-at-runtime) using npx or Docker.\n\n## Step 2 - Build the HTML file\n\nThe Redocly CLI `build-docs` command builds Redoc into an HTML file.\n\nTo build an HTML file using Redocly CLI, enter the following command,\nreplacing `apis/openapi.yaml` with your API definition file's name and path:\n\n```bash\nredocly build-docs apis/openapi.yaml\n```\n\nSee the [build-docs](../../cli/commands/build-docs) documentation for more information\non the different options and ways you can use the command.\n\nAlso, check out [Redocly CLI commands](../../cli/commands), for more\ninformation on the different things you can do with Redocly CLI including\nlinting, splitting, and bundling your API definition file.\n"
  },
  {
    "path": "docs/deployment/docker.md",
    "content": "---\nseo:\n  title: Use the Redoc Docker image\n---\n\n# How to use the Redoc Docker image\n\nRedoc is available as a pre-built Docker image in [Docker Hub](https://hub.docker.com/r/redocly/redoc/).\n\nIf you have [Docker](https://docs.docker.com/get-docker/) installed, pull the image with the following command:\n\n```docker\ndocker pull redocly/redoc\n```\n\nThen run the image with the following command:\n\n```docker\ndocker run -p 8080:80 redocly/redoc\n```\n\nThe preview starts on port 8080, based on the port used in the command,\nand can be accessed at `http://localhost:8080`.\nTo exit the preview, use `control+C`.\n\nBy default Redoc starts with a demo Swagger Petstore OpenAPI definition located at\nhttp://petstore.swagger.io/v2/swagger.json. You can update this URL using\nthe environment variable `SPEC_URL`.\n\nFor example:\n\n```bash\ndocker run -p 8080:80 -e SPEC_URL=https://api.example.com/openapi.json redocly/redoc\n```\n\n## Create a Dockerfile\n\nYou can also create a Dockerfile with some predefined environment variables. Check out\na sample [Dockerfile](https://github.com/Redocly/redoc/blob/main/config/docker/Dockerfile)\nin our code repo.\n"
  },
  {
    "path": "docs/deployment/html.md",
    "content": "---\nseo:\n  title: Use the Redoc HTML element\n---\n\n# Use Redoc in HTML\n\nTo render API documentation in an HTML page, start with the template below and\nreplace the `spec-url` value with the local file path or URL of your API\ndescription.\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>Redoc</title>\n    <!-- needed for adaptive design -->\n    <meta charset=\"utf-8\"/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n    <link href=\"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700\" rel=\"stylesheet\">\n\n    <!--\n    Redoc doesn't change outer page styles\n    -->\n    <style>\n      body {\n        margin: 0;\n        padding: 0;\n      }\n    </style>\n  </head>\n  <body>\n    <redoc spec-url='http://petstore.swagger.io/v2/swagger.json'></redoc>\n    <script src=\"https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\"> </script>\n  </body>\n</html>\n```\n\n{% admonition type=\"success\" name=\"URL or local file\" %}\nSet `spec-url` to a relative path if the file is local, e.g. `spec-url=my-api.yaml`. Use a full URL like the example above if it's hosted elsewhere.\n{% /admonition %}\n\nOpen the HTML file in your browser to see the HTML documentation rendering. You may want to read the next section and add some configuration to make your documentation your own.\n\n## Configure Redoc\n\nRedoc is highly configurable, find a [full list of configuration options](../config.md) on the dedicated page.\n\nTo configure Redoc in HTML, add the property names to the HTML tag. Here's an example that makes all the required properties display first in the list:\n\n```html\n    <redoc spec-url='http://petstore.swagger.io/v2/swagger.json' required-props-first=true></redoc>\n```\n\nAny of the individual properties can be added to the tag, as many as you need to get your API docs set up as you like them.\n\n### Theme configuration\n\nThe `theme` configuration setting is more complex since it represents many nested options, you can supply these as a JSON string to the `theme` attribute. For example, to change the sidebar color you would use a tag like this:\n\n```html\n    <redoc spec-url='http://petstore.swagger.io/v2/swagger.json'\n       required-props-first=true\n       theme='{\n         \"sidebar\": {\n           \"backgroundColor\": \"lightblue\"\n         }\n       }'\n    ></redoc>\n```\n\nCheck out the [list of options for theme configuration](../config.md#theme-settings) and build up the configuration that suits your API needs.\n\n## Advanced options\n\n### The Redoc object\n\nAs an alternative to the HTML tag, you can also initialise Redoc in a web page using the Redoc object and invoking it from JavaScript. This is useful for situations where you want to create dynamic content in a page, and also provides a simple way to attach the Redoc element to an existing container.\n\nThe Redoc object offers an `init` function:\n\n```js\nRedoc.init(specOrSpecUrl, options, element, callback)\n```\n- `specOrSpecUrl`: Either a JSON object with the OpenAPI definition or a file name/URL to the\n  definition in JSON or YAML format.\n- `options`: See the [configuration reference](../config.md).\n- `element`: DOM element Redoc is inserted into.\n- `callback`(optional): Callback to be called after Redoc has been fully rendered.\n  It is also called on errors with `error` as the first argument.\n\nCall `Redoc.init()` from the JavaScript on a web page to add the element to the named container. Below is an example of an HTML page with a `<div>` tag, and the JavaScript to add the Redoc object to it.\n\n```html\n<!DOCTYPE html>\n<html>\n  <head />\n  <body>\n    <H1>Redoc in action</H1>\n    <script src=\"https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\"> </script>\n    <div id=\"redoc-container\"></div>\n\n    <script>\n      Redoc.init('http://petstore.swagger.io/v2/swagger.json', {\n        \"expandResponses\": \"200,400\"\n      }, document.getElementById('redoc-container'))\n    </script>\n  </body>\n</html>\n```\n\nThis example also sets the configuration for `expandResponses` so all 200 and 400 status responses are shown unfolded and with their details visible when the page loads.\n\n### Self-host dependencies\n\nYou can reference the Redoc script using either a link to the files hosted on a CDN\nor install to your `node-modules` folder. Using the CDN is the simplest option, but\nif you need to host in a closed environment or have requirements around external\ndependencies, it may be useful to self-host.\n\nThe main example shows using the CDN:\n\n```html\n<script src=\"https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\"> </script>\n```\n\nIf you would instead prefer to host the depdencies yourself, first install `redoc` using `npm`:\n\n```sh\nnpm install redoc\n```\n\n_(Yarn users can install the `redoc` package with `yarn`)_.\n\nYou can then reference the Redoc script with a node modules link:\n\n```html\n<script src=\"node_modules/redoc/bundles/redoc.standalone.js\"> </script>\n```\n\n"
  },
  {
    "path": "docs/deployment/intro.md",
    "content": "---\nseo:\n  title: Redoc deployment guide\n---\n\n# Redoc deployment guide\n\nRedoc offers multiple options for rendering your OpenAPI definition.\nYou should select the option that best fits your needs.\n\nThe following options are supported:\n\n- **[Live demo](https://redocly.github.io/redoc/):**\n  The live demo offers a fast way to see how your OpenAPI renders with Redoc.\n  A version of the Swagger Petstore API is displayed by default. To test it with your own OpenAPI definition, enter the URL for your\n  definition and select **TRY IT**.\n- **[HTML element](./html.md):**\n  Using the HTML element works well for typical website deployments.\n- **[React component](./react.md):**\n  Using the React component is an option for users with a React-based application.\n- **[Docker image](./docker.md):**\n  Using the Docker image works in a container-based deployment.\n- **[Redocly CLI](./cli.md):**\n  Using the Redocly CLI is an option for users who prefer to use a command-line interface.\n\n## Before you start\n\n### OpenAPI definition\n\nYou need an OpenAPI definition. For testing purposes, you can use one of the following sample OpenAPI definitions:\n\n- OpenAPI 3.0\n  - [Museum Example API](https://github.com/Redocly/museum-openapi-example/blob/main/openapi.yaml)\n  - [Petstore Sample OpenAPI Definition](https://petstore3.swagger.io/api/v3/openapi.json)\n- OpenAPI 2.0\n  - [Thingful OpenAPI Definition](https://raw.githubusercontent.com/thingful/openapi-spec/master/spec/swagger.yaml)\n  - [Fitbit Plus OpenAPI Definition](https://raw.githubusercontent.com/TwineHealth/TwineDeveloperDocs/master/spec/swagger.yaml)\n\n{% admonition type=\"info\" name=\"OpenAPI specification\" %}\nFor more information on the OpenAPI specification, refer to the [Learning OpenAPI 3](https://redocly.com/docs/resources/learning-openapi/)\nsection in the documentation.\n{% /admonition %}\n\n### How to run Redoc locally\n\nIf you want to view your Redoc output locally, you can simulate an HTTP server.\n\n#### Python\n\nIf you have [Python 3](https://www.python.org/downloads/) installed, `cd` into your\nproject directory and run the following command:\n\n```python\npython3 -m http.server\n```\n\nIf you have [Python 2](https://www.python.org/downloads/) installed, `cd` into your\nproject directory and run the following command:\n\n```python\npython -m SimpleHTTPServer 8000\n```\n\nThe output after entering the command provides the local URL where the preview can be accessed.\nTo exit the preview, use `control-C`.\n\n#### Node.js\n\nIf you have [Node.js](https://nodejs.org/en/download/) installed, install `http-server`\nusing the following npm command:\n\n```bash\nnpm install -g http-server\n```\n\nThen, `cd` into your project directory and run the following command:\n\n```node\nhttp-server\n```\n\nThe output after entering the command provides the local URL where the preview can be accessed.\nTo exit the preview, use `control-C`.\n"
  },
  {
    "path": "docs/deployment/react.md",
    "content": "---\nseo:\n  title: Use the Redoc React component\nredirects:\n  '/docs/redoc/quickstart/react/':\n    to: '/docs/redoc/deployment/react/'\n---\n\n# How to use the Redoc React component\n\n## Before you start\n\nInstall the following dependencies required by Redoc if you do not already have them installed:\n\n- `react`\n- `react-dom`\n- `mobx`\n- `styled-components`\n- `core-js`\n\nIf you have npm installed, you can install these dependencies using the following command:\n\n```js\nnpm i react react-dom mobx styled-components core-js\n```\n\n## Step 1 - Import the `RedocStandalone` component\n\n```js\nimport { RedocStandalone } from 'redoc';\n```\n\n## Step 2 - Use the component\n\nYou can either link to your OpenAPI definition with a URL, using the following format:\n\n```react\n<RedocStandalone specUrl=\"url/to/your/spec\"/>\n```\n\nOr you can pass your OpenAPI definition as an object, using the following format:\n\n```js\n<RedocStandalone spec={/* spec as an object */}/>\n```\n\n## Optional - Pass options\n\nOptions can be passed into the RedocStandalone component to alter how it renders.\n\nFor example:\n\n```js\n<RedocStandalone\n  specUrl=\"http://petstore.swagger.io/v2/swagger.json\"\n  options={{\n    nativeScrollbars: true,\n    theme: { colors: { primary: { main: '#dd5522' } } },\n  }}\n/>\n```\n\nFor more information on configuration options, refer to the\n[Configuration options for Reference docs](https://redocly.com/docs/api-reference-docs/configuration/functionality/)\nsection of the documentation. Options available for Redoc are noted,\n\"Supported in Redoc CE\".\n\n## Optional - Specify `onLoaded` callback\n\nYou can also specify the `onLoaded` callback, which is called each time Redoc\nis fully rendered or when an error occurs (with an error as the first argument).\n\n```js\n<RedocStandalone\n  specUrl=\"http://petstore.swagger.io/v2/swagger.json\"\n  onLoaded={(error) => {\n    if (!error) {\n      console.log('Yay!');\n    }\n  }}\n/>\n```\n"
  },
  {
    "path": "docs/index.md",
    "content": "---\nseo:\n  title: Redoc\n---\n\n# Redoc: Open source API documentation tool\n\nRedoc is a clean and easy way to produce web-ready documentation from an OpenAPI description (Swagger is also still supported). With one command, create your documentation, and customize it to meet the needs of your users.\n\nRedoc is based around a three panel layout, with clear sections for navigation, detailed documentation, and request/response examples.\n\n## Headline features\n\n* Modern layout with extensive customization options.\n* Support for OpenAPI 3.1, 3.0 and older 2.0 and Swagger formats.\n* Embed or build standalone HTML documentation.\n* CLI tool for easy automation and local development.\n\n## Demo\n\n[Try the live demo](https://redocly.github.io/redoc/) and upload your own API specification there to try.\n\n## Usage\n\nRedoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, and React component.\n\n### Generate documentation from the CLI\n\nIf you have Node installed, quickly generate documentation using `npx`:\n\n```sh\nnpx @redocly/cli build-docs openapi.yaml\n```\n\nThe tool outputs by default to a file named `redoc-static.html` that you can open in your browser.\n\n> [Redocly CLI](https://github.com/Redocly/redocly-cli/) does more than docs, check it out and add linting, bundling and more to your API workflow.\n\n### Add an HTML element to the page\n\nCreate an HTML page, or edit an existing one, and add the following:\n\n```html\n    <redoc spec-url=\"http://petstore.swagger.io/v2/swagger.json\"></redoc>\n    <script src=\"https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\"> </script>\n```\n\nOpen the HTML file in your browser, and your API documentation is shown on the page.\n\nAdd your own `spec-url` to the `<redoc>` tag; this attribute can also be a local file. The JavaScript library can also be installed locally using `npm` and served from your own server, see the [HTML deployment documentation](https://redocly.com/docs/redoc/deployment/html/) for more details.\n\n### More usage options\n\nCheck out the [deployment documentation](./deployment/intro.md) for more options, and detailed documentation for each.\n\n## Configure Redoc\n\nRedoc is highly configurable. Each deployment option accepts configuration in a way that's appropriate to that platform, but the options are the same for each. For example:\n\n* Using [Redocly CLI](../cli), configuration goes in the `redocly.yaml` file, or can be supplied as command line parameters, such as `--theme.openapi.disableSearch`.\n* Using HTML or React, configure by setting `option` in the tag.\n\nHere's a sample `redocly.yaml` configuration file, showing a few common settings and tweaking some of the visual theme settings:\n\n```yaml\ntheme:\n  openapi:\n    disableSearch: true\n    expandResponses: 200,202\n    jsonSamplesExpandLevel: 1\n\n    theme:\n      sidebar:\n        backgroundColor: '#eae0cc'\n        textColor: '#3d005b'\n      colors:\n        primary:\n          main: '#660099'\n      typography:\n        fontSize: 14pt\n        headings:\n          fontWeight: bold\n```\n\nRedocly CLI detects a file named `redocly.yaml` in the same directory as you run the command and uses it. See the documentation with a command like this:\n\n```sh\nredocly build-docs openapi.yaml\n```\n\nThere are many, many more options available. Visit the [configuration reference](./config.md) for a complete list.\n\n## Next steps\n\n* If you are new to OpenAPI, try the [OpenAPI starter project](../cli/openapi-starter) for a great introduction.\n* Ready to build documentation from an existing OpenAPI file? Go to the [Redoc quickstart](./quickstart.md) and get started.\n* Learn more about the project by visiting [Redoc on GitHub](https://github.com/Redocly/redoc).\n"
  },
  {
    "path": "docs/quickstart.md",
    "content": "---\nseo:\n  title: Redoc quickstart guide\n---\n\n# Redoc quickstart guide\n\nTo render your OpenAPI definition using Redoc, use the following HTML code sample and\nreplace the `spec-url` attribute with the URL or local file address to your definition.\n\n```html\n<!DOCTYPE html>\n<html>\n  <head>\n    <title>Redoc</title>\n    <!-- needed for adaptive design -->\n    <meta charset=\"utf-8\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <link\n      href=\"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700\"\n      rel=\"stylesheet\"\n    />\n\n    <!--\n    Redoc doesn't change outer page styles\n    -->\n    <style>\n      body {\n        margin: 0;\n        padding: 0;\n      }\n    </style>\n  </head>\n  <body>\n    <!--\n    Redoc element with link to your OpenAPI definition\n    -->\n    <redoc spec-url=\"http://petstore.swagger.io/v2/swagger.json\"></redoc>\n    <!--\n    Link to Redoc JavaScript on CDN for rendering standalone element\n    -->\n    <script src=\"https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js\"></script>\n  </body>\n</html>\n```\n\n{% admonition type=\"info\" name=\"Redoc requires an HTTP server to run locally\" %}\nLoading local OpenAPI definitions is impossible without running a web server because of issues with\n[same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy) and\nother security reasons. Refer to [Running Redoc locally](./deployment/intro.md#how-to-run-redoc-locally) for more information.\n{% /admonition %}\n\nFor a more detailed explanation with step-by-step instructions and additional options for using Redoc, refer to the [Redoc deployment guide](./deployment/intro.md).\n"
  },
  {
    "path": "docs/redoc-vendor-extensions.md",
    "content": "# Redoc vendor extensions\n\nYou can use the following [vendor extensions](https://redocly.com/docs/openapi-visual-reference/specification-extensions/) with Redoc.\n\n- [Redoc vendor extensions](#redoc-vendor-extensions)\n  - [Swagger Object](#swagger-object)\n    - [x-servers](#x-servers)\n    - [x-tagGroups](#x-taggroups)\n      - [How to use with Redoc](#how-to-use-with-redoc)\n    - [Tag Group Object](#tag-group-object)\n      - [Fixed fields](#fixed-fields)\n      - [x-tagGroups example](#x-taggroups-example)\n  - [Info Object](#info-object)\n    - [x-logo](#x-logo)\n      - [How to use with Redoc](#how-to-use-with-redoc-1)\n    - [Logo Object](#logo-object)\n      - [Fixed fields](#fixed-fields-1)\n      - [x-logo example](#x-logo-example)\n  - [Tag Object](#tag-object)\n    - [x-traitTag](#x-traittag)\n      - [How to use with Redoc](#how-to-use-with-redoc-2)\n      - [x-traitTag example](#x-traittag-example)\n    - [x-displayName](#x-displayname)\n  - [Operation Object vendor extensions](#operation-object-vendor-extensions)\n    - [x-codeSamples](#x-codesamples)\n      - [How to use with Redoc](#how-to-use-with-redoc-3)\n    - [Code Sample Object](#code-sample-object)\n      - [Fixed fields](#fixed-fields-2)\n      - [Code Sample Object example](#code-sample-object-example)\n    - [x-badges](#x-badges)\n  - [Parameter Object](#parameter-object)\n    - [x-examples](#x-examples)\n      - [How to use with Redoc](#how-to-use-with-redoc-4)\n  - [Response Object vendor extensions](#response-object-vendor-extensions)\n    - [x-summary](#x-summary)\n      - [How to use with Redoc](#how-to-use-with-redoc-5)\n  - [Schema Object](#schema-object)\n    - [x-nullable](#x-nullable)\n      - [How to use with Redoc](#how-to-use-with-redoc-6)\n    - [x-additionalPropertiesName](#x-additionalpropertiesname)\n      - [How to use with Redoc](#how-to-use-with-redoc-7)\n      - [x-additionalPropertiesName example](#x-additionalpropertiesname-example)\n    - [x-explicitMappingOnly](#x-explicitmappingonly)\n      - [How to use with Redoc](#how-to-use-with-redoc-8)\n      - [x-explicitMappingOnly example](#x-explicitmappingonly-example)\n    - [x-enumDescriptions](#x-enumdescriptions)\n      - [How to use with Redoc](#how-to-use-with-redoc-9)\n      - [x-enumDescriptions example](#x-enumdescriptions-example)\n\n## Swagger Object\nExtends the OpenAPI root [OpenAPI Object](https://redocly.com/docs/openapi-visual-reference/openapi)\n\n### x-servers\nBackported from OpenAPI 3.0 [`servers`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#server-object). Currently doesn't support templates.\n\n### x-tagGroups\n\n| Field Name     | Type        | Description |\n| :------------- | :-----------: | :---------- |\n| x-tagGroups         | [ [Tag Group Object](#tag-group-object) ] | A list of tag groups |\n\n#### How to use with Redoc\n`x-tagGroups` is used to group tags in the side menu.\nBefore you use `x-tagGroups`, make sure you **add all tags to a group**, since a tag that is not in a group, **is not displayed** at all!\n\n<a name=\"tagGroupObject\"></a>\n\n#### Tag Group Object\nInformation about tags group\n##### Fixed fields\n\n| Field Name  | Type      | Description |\n| :---------- | :--------: | :---------- |\n| name        | string     | The group name |\n| tags        | [ string ] | List of tags to include in this group |\n\n#### x-tagGroups example\njson\n```json\n{\n  \"x-tagGroups\": [\n    {\n      \"name\": \"User Management\",\n      \"tags\": [\"Users\", \"API keys\", \"Admin\"]\n    },\n    {\n      \"name\": \"Statistics\",\n      \"tags\": [\"Main Stats\", \"Secondary Stats\"]\n    }\n  ]\n}\n```\nyaml\n```yaml\nx-tagGroups:\n  - name: User Management\n    tags:\n      - Users\n      - API keys\n      - Admin\n  - name: Statistics\n    tags:\n      - Main Stats\n      - Secondary Stats\n```\n\n## Info Object\nExtends the OpenAPI [Info Object](https://redocly.com/docs/openapi-visual-reference/info/)\n\n### x-logo\n\n| Field Name     | Type        | Description |\n| :------------- | :-----------: | :---------- |\n| x-logo         | [Logo Object](#logo-object)  | The information about API logo |\n\n#### How to use with Redoc\n`x-logo` is used to specify API logo. The corresponding image is displayed just above the side-menu.\n\n<a name=\"logoObject\"></a>\n\n#### Logo Object\nThe information about API logo\n\n#### Fixed fields\n\n| Field Name      | Type    | Description |\n| :-------------- | :------: | :---------- |\n| url             | string   | The URL pointing to the spec logo. MUST be in the format of a URL. It SHOULD be an absolute URL so your API definition is usable from any location |\n| backgroundColor | string   | background color to be used. MUST be RGB color in [hexadecimal format] (https://en.wikipedia.org/wiki/Web_colors#Hex_triplet) |\n| altText        | string   | Text to use for alt tag on the logo. Defaults to 'logo' if nothing is provided. |\n| href        | string   | The URL pointing to the contact page. Default to 'info.contact.url' field of the OAS. |\n\n\n#### x-logo example\njson\n```json\n{\n  \"info\": {\n    \"version\": \"1.0.0\",\n    \"title\": \"Swagger Petstore\",\n    \"x-logo\": {\n      \"url\": \"https://redocly.github.io/redoc/petstore-logo.png\",\n      \"backgroundColor\": \"#FFFFFF\",\n      \"altText\": \"Petstore logo\"\n    }\n  }\n}\n```\nyaml\n```yaml\ninfo:\n  version: \"1.0.0\"\n  title: \"Swagger Petstore\"\n  x-logo:\n    url: \"https://redocly.github.io/redoc/petstore-logo.png\"\n    backgroundColor: \"#FFFFFF\"\n    altText: \"Petstore logo\"\n```\n\n## Tag Object\nExtends the OpenAPI [Tag Object](https://redocly.com/docs/openapi-visual-reference/tags/)\n\n### x-traitTag\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-traitTag     | boolean  | In Swagger two operations can have multiple tags. This property distinguishes between tags that are used to group operations (default) from tags that are used to mark operation with certain trait (`true` value) |\n\n#### How to use with Redoc\nTags that have `x-traitTag` set to `true` are listed in the side-menu but don't have any subitems (operations). It also renders the `description` tag.\nThis is useful for handling out common things like Pagination, Rate-Limits, etc.\n\n#### x-traitTag example\njson\n```json\n{\n    \"name\": \"Pagination\",\n    \"description\": \"Pagination description (can use markdown syntax)\",\n    \"x-traitTag\": true\n}\n```\nyaml\n```yaml\nname: Pagination\ndescription: Pagination description (can use markdown syntax)\nx-traitTag: true\n```\n\n### x-displayName\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-displayName  | string   | Defines the text that is used for this tag in the menu and in section headings |\n\n## Operation Object vendor extensions\nExtends the OpenAPI [Operation Object](https://redocly.com/docs/openapi-visual-reference/operation/)\n\n### x-codeSamples\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-codeSamples | [ [Code Sample Object](#code-sample-object) ]  | A list of code samples associated with operation |\n\n#### How to use with Redoc\n`x-codeSamples` are rendered on the right panel in Redoc.\n\n<a name=\"codeSampleObject\"></a>\n\n### Code Sample Object\nOperation code sample\n\n#### Fixed fields\n\n| Field Name  | Type    | Description  |\n| :---------- | :------: | :----------- |\n| lang        | string   | Code sample language. Value should be one of the following [list](https://github.com/github/linguist/blob/master/lib/linguist/popular.yml) |\n| label       | string?   | Code sample label, for example `Node` or `Python2.7`, _optional_, `lang` is used by default |\n| source      | string   | Code sample source code |\n\n\n#### Code Sample Object example\njson\n```json\n{\n  \"lang\": \"JavaScript\",\n  \"source\": \"console.log('Hello World');\"\n}\n```\nyaml\n```yaml\nlang: JavaScript\nsource: console.log('Hello World');\n```\n\n### x-badges\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-badges | [[Badge Object](https://redocly.com/docs/realm/author/reference/openapi-extensions/x-badges#badge-object)] | A list of badges associated with the operation |\n\n## Parameter Object\nExtends the OpenAPI [Parameter Object](https://redocly.com/docs/openapi-visual-reference/parameter/)\n\n### x-examples\n\n| Field Name     |  Type    | Description |\n| :------------- | :------: | :---------- |\n| x-examples | [Example Object](https://redocly.com/docs/openapi-visual-reference/example/)  | Object that contains examples for the request. Applies when `in` is `body` and mime-type is `application/json` |\n\n#### How to use with Redoc\n`x-examples` are rendered in the JSON tab on the right panel in Redoc.\n\n## Response Object vendor extensions\nExtends the OpenAPI [Response Object](https://redocly.com/docs/openapi-visual-reference/response/).\n\n### x-summary\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-summary      | string   | a short summary of the response |\n\n#### How to use with Redoc\nIf specified, you can use `x-summary` as the response button text, with description rendered under the button.\n\n## Schema Object\nExtends the OpenAPI [Schema Object](https://redocly.com/docs/openapi-visual-reference/schemas/)\n\n### x-nullable\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-nullable | boolean | marks schema as a nullable |\n\n#### How to use with Redoc\nSchemas marked as `x-nullable` are marked in Redoc with the label Nullable.\n\n### x-additionalPropertiesName\n**Attention**: This is a Redoc-specific vendor extension, and is not supported by other tools.\n\nExtends the `additionalProperties` property of the schema object.\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-additionalPropertiesName | string | descriptive name of additional properties keys  |\n\n#### How to use with Redoc\nRedoc uses this extension to display a more descriptive property name in objects with `additionalProperties` when viewing the property list with an `object`.\n\n#### x-additionalPropertiesName example\n\n```yaml\nPlayer:\n  required:\n  - name\n\n  properties:\n    name:\n      type: string\n\n  additionalProperties:\n    x-additionalPropertiesName: attribute-name\n    type: string\n```\n\n### x-explicitMappingOnly\n**Attention**: This is Redoc-specific vendor extension, and is not supported by other tools.\n\nExtends the `discriminator` property of the schema object.\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-explicitMappingOnly | boolean | limit the discriminator selectpicker to the explicit mappings only |\n\n#### How to use with Redoc\nRedoc uses this extension to filter the `discriminator` mappings shown in the selectpicker.\nWhen set to `true`, the selectpicker lists only the explicitly defined mappings. When `false`, the default behavior is kept, in other words, explicit and implicit mappings are shown.\n\n#### x-explicitMappingOnly example\n\n\n```yaml\nPet:\n  type: object\n  required:\n    - name\n    - photoUrls\n  discriminator:\n    propertyName: petType\n    x-explicitMappingOnly: true\n    mapping:\n      cat: \"#/components/schemas/Cat\"\n      bee: \"#/components/schemas/HoneyBee\"\n```\n\nShows in the selectpicker only the items `cat` and `bee`, even though the `Dog` class inherits from the `Pet` class.\n\n### x-enumDescriptions\n\n| Field Name     | Type   | Description |\n| :------------- | :------: | :---------- |\n| x-enumDescriptions | [[Enum Description Object](https://redocly.com/docs/realm/author/reference/openapi-extensions/x-enum-descriptions#enum-description-object)] | A list of the enum values and descriptions to include in the documentation. |\n\n#### How to use with Redoc\nThe enum (short for \"enumeration\") fields in OpenAPI allow you to restrict the value of a field to a list of allowed values. These values need to be short and machine-readable, but that can make them harder for humans to parse and work with.\n\nAdd x-enumDescriptions to your OpenAPI description to show a helpful table of enum options and an explanation of what each one means. This field supports Markdown.\n\n#### x-enumDescriptions example\nThe following example shows a schema with two short-named options, and the x-enumDescriptions entry to list all enum entries and give additional context for each:\n\n```yaml\ncomponents:\n  schemas:\n    TicketType:\n      description: Type of ticket being purchased. Use `general` for regular museum entry and `event` for tickets to special events.\n      type: string\n      enum:\n        - event\n        - general\n      x-enumDescriptions:\n        event: Event Tickets _(timed entry)_\n        general: General Admission\n      example: event\n```"
  },
  {
    "path": "docs/security-definitions-injection.md",
    "content": "# Injection security definitions\n\nYou can inject the Security Definitions widget anywhere in your specification `description`:\n\n```markdown\n...\n## Authorization\n\nSome description\n\n<!-- Redoc-Inject: <security-definitions> -->\n...\n```\nThe inject instruction is wrapped in an HTML comment,\nso it is **visible only in Redoc** and not visible, for instance, in the SwaggerUI.\n\n## Default behavior\n\nIf the injection tag is not found in the description, it is appended to the end\nof description under the `Authentication` header.\n\nIf the `Authentication` header is already present in the description,\nSecurity Definitions are not inserted or rendered.\n"
  },
  {
    "path": "e2e/e2e.html",
    "content": "<html>\n  <body>\n    <script src=\"../bundles/redoc.standalone.js\">{}</script>\n    <div id=\"redoc\" />\n  </body>\n</html>;\n"
  },
  {
    "path": "e2e/index.html",
    "content": "<html>\n  <body>\n    <script src=\"../bundles/redoc.standalone.js\">{}</script>\n    <div id=\"redoc\" />\n  </body>\n</html>;\n"
  },
  {
    "path": "e2e/integration/menu.e2e.ts",
    "content": "describe('Menu', () => {\n  describe('3.0 spec', () => {\n    beforeEach(() => {\n      cy.visit('e2e/standalone.html');\n    });\n    it('should have valid items count', () => {\n      cy.get('.menu-content').find('li').should('have.length', 35);\n    });\n\n    it('should sync active menu items while scroll', () => {\n      cy.contains('h2', 'Introduction')\n        .scrollIntoView()\n        .get('[role=menuitem] > label.active')\n        .should('have.text', 'Introduction');\n\n      cy.contains('h2', 'Add a new pet to the store')\n        .scrollIntoView()\n        .wait(100)\n        .get('[role=menuitem] > label.active')\n        .children()\n        .last()\n        .should('have.text', 'Add a new pet to the store')\n        .should('be.visible');\n    });\n\n    it('should sync active menu items while scroll back and scroll again', () => {\n      cy.contains('h2', 'Add a new pet to the store')\n        .scrollIntoView()\n        .wait(100)\n        .get('[role=menuitem] > label.active')\n        .children()\n        .last()\n        .should('have.text', 'Add a new pet to the store')\n        .should('be.visible');\n\n      cy.contains('h1', 'Swagger Petstore').scrollIntoView().wait(100);\n\n      cy.contains('h2', 'Introduction')\n        .scrollIntoView()\n        .wait(100)\n        .get('[role=menuitem] > label.active')\n        .should('have.text', 'Introduction');\n\n      cy.url().should('include', '#section/Introduction');\n    });\n\n    it('should update URL hash when clicking on menu items', () => {\n      cy.contains('[role=menuitem] > label.-depth1', 'pet').click({ force: true });\n      cy.get('li[data-item-id=\"schema/Cat\"]')\n        .should('have.text', 'schemaCat')\n        .click({ force: true });\n      cy.location('hash').should('equal', '#schema/Cat');\n    });\n\n    it('should contains badge schema from x-badges', () => {\n      cy.contains('h2', 'Add a new pet to the store').scrollIntoView();\n\n      cy.contains('h2 > span', 'Beta')\n        .scrollIntoView()\n        .wait(100)\n        .get('[role=menuitem] > label.active')\n        .children('span[type=\"badge\"]')\n        .should('have.text', 'Beta');\n\n      cy.contains('h2 > span', 'Alpha')\n        .scrollIntoView()\n        .wait(100)\n        .get('[role=menuitem] > label.active')\n        .children('span[type=\"badge\"]')\n        .should('have.text', 'Alpha');\n\n      cy.contains('h2 > span', 'Gamma')\n        .scrollIntoView()\n        .wait(100)\n        .get('[role=menuitem] > label.active')\n        .children('span[type=\"badge\"]')\n        .should('have.text', 'Gamma');\n    });\n\n    it('should contains Cat schema in Pet using x-tags', () => {\n      cy.contains('[role=menuitem] > label.-depth1', 'pet').click({ force: true });\n      cy.location('hash').should('equal', '#tag/pet');\n\n      cy.contains('[role=menuitem]', 'Find pet by ID').click({ force: true });\n      cy.location('hash').should('equal', '#tag/pet/operation/getPetById');\n    });\n\n    it('should deactivate tag when other is activated', () => {\n      const petItem = () => cy.contains('[role=menuitem] > label.-depth1', 'pet');\n\n      petItem().click({ force: true }).should('have.class', 'active');\n      cy.contains('[role=menuitem] > label.-depth1', 'store').click({ force: true });\n      petItem().should('not.have.class', 'active');\n    });\n\n    it('should be able to open a response object to see more details', () => {\n      cy.contains('h2', 'Find pet by ID')\n        .scrollIntoView()\n        .wait(100)\n        .parent()\n        .find('div h3')\n        .should('have.text', 'Responses')\n        .parent()\n        .find('div:first button')\n        .click()\n        .should('have.attr', 'aria-expanded', 'true')\n        .parent()\n        .find('div h5')\n        .then($h5 => $h5[0].firstChild!.nodeValue!.trim())\n        .should('eq', 'Response Schema:');\n    });\n  });\n\n  it('should be able to open the operation details when the operation IDs have quotes', () => {\n    cy.visit('e2e/standalone-3-1.html');\n    cy.get('label span[title=\"pet\"]').click({ multiple: true, force: true });\n    cy.get('li').contains('OperationId with quotes').click({ multiple: true, force: true });\n    cy.get('h2').contains('OperationId with quotes').should('be.visible');\n    cy.url().should('include', 'deletePetBy%22Id');\n  });\n\n  it('should encode URL when the operation IDs have backslashes', () => {\n    cy.visit('e2e/standalone-3-1.html');\n    cy.get('label span[title=\"pet\"]').click({ multiple: true, force: true });\n    cy.get('li').contains('OperationId with backslash').click({ multiple: true, force: true });\n    cy.get('h2').contains('OperationId with backslash').should('be.visible');\n    cy.url().should('include', 'delete%5CPetById');\n  });\n});\n"
  },
  {
    "path": "e2e/integration/misc.e2e.ts",
    "content": "// tslint:disable:no-implicit-dependencies\nimport * as yaml from 'js-yaml';\n\nasync function loadSpec(url: string): Promise<any> {\n  const spec = await (await fetch(url)).text();\n  return yaml.load(spec);\n}\n\nfunction initReDoc(win, spec, options = {}) {\n  (win as any).Redoc.init(spec, options, win.document.getElementById('redoc'));\n}\n\ndescribe('Servers', () => {\n  beforeEach(() => {\n    cy.visit('e2e/');\n  });\n\n  it('should have valid server', () => {\n    cy.window().then(async win => {\n      const spec = await loadSpec('/demo/openapi.yaml');\n      initReDoc(win, spec, {});\n\n      // TODO add cy-data attributes\n      cy.get('[data-section-id=\"tag/pet/operation/addPet\"]').should(\n        'contain',\n        'http://petstore.swagger.io/v2/pet',\n      );\n\n      cy.get('[data-section-id=\"tag/pet/operation/addPet\"]').should(\n        'contain',\n        'http://petstore.swagger.io/sandbox/pet',\n      );\n    });\n  });\n\n  it('should have valid server for when servers not provided', () => {\n    cy.window().then(async win => {\n      const spec = await loadSpec('/demo/openapi.yaml');\n      delete spec.servers;\n      initReDoc(win, spec, {});\n\n      // TODO add cy-data attributes\n      cy.get('[data-section-id=\"tag/pet/operation/addPet\"]').should(\n        'contain',\n        'http://localhost:' + win.location.port + '/pet',\n      );\n    });\n  });\n\n  it('should have valid server for when servers not provided at .html pages', () => {\n    cy.visit('e2e/e2e.html');\n    cy.window().then(async win => {\n      const spec = await loadSpec('/demo/openapi.yaml');\n      delete spec.servers;\n      initReDoc(win, spec, {});\n\n      // TODO add cy-data attributes\n      cy.get('[data-section-id=\"tag/pet/operation/addPet\"]').should(\n        'contain',\n        'http://localhost:' + win.location.port + '/pet',\n      );\n    });\n  });\n});\n"
  },
  {
    "path": "e2e/integration/search.e2e.ts",
    "content": "describe('Search', () => {\n  const getSearchInput = () => cy.get('[role=\"search\"] input');\n  const getSearchResults = () => cy.get('[data-role=\"search:results\"]');\n  const getResult = i => cy.get('[role=search] label').eq(i);\n\n  beforeEach(() => {\n    cy.visit('e2e/standalone.html');\n  });\n\n  it('should correctly show and hide search results box', () => {\n    getSearchResults().should('not.exist');\n\n    // should not open for less than 3 symbols\n    getSearchInput().type('in', { force: true });\n    getSearchResults().should('not.exist');\n\n    getSearchInput().type('t', { force: true });\n    cy.get('[role=search] [role=menuitem]')\n      .should('have.length', 3)\n      .first()\n      .should('contain', 'Introduction');\n\n    getSearchInput().type('{esc}', { force: true });\n    getSearchResults().should('not.exist');\n  });\n\n  it('should support arrow navigation', () => {\n    getSearchInput().type('int', { force: true });\n\n    cy.wait(500);\n\n    getSearchInput().type('{downarrow}', { force: true });\n    getResult(0).should('have.class', 'active');\n\n    getSearchInput().type('{downarrow}', { force: true });\n    getResult(1).should('have.class', 'active');\n    getResult(0).should('not.have.class', 'active');\n\n    getSearchInput().type('{uparrow}', { force: true });\n    getResult(1).should('not.have.class', 'active');\n    getResult(0).should('have.class', 'active');\n\n    getSearchInput().type('{uparrow}', { force: true });\n    getResult(0).should('have.class', 'active');\n\n    getSearchInput().type('{enter}', { force: true });\n\n    cy.contains('[role=menu] label', 'Introduction').should('have.class', 'active');\n  });\n\n  it('should mark search results', () => {\n    cy.get('[data-markjs]').should('not.exist');\n    getSearchInput().type('int', { force: true });\n    cy.get('[data-markjs]').should('exist');\n  });\n\n  it('should show proper message when no search results are found', () => {\n    getSearchResults().should('not.exist');\n    getSearchInput().type('xzss', { force: true });\n    getSearchResults().should('exist').should('contain', 'No results found');\n  });\n\n  it('should allow search by path or keywords in path', () => {\n    getSearchInput().clear().type('uploadImage', { force: true });\n    cy.get('[role=search] [role=menuitem]')\n      .should('have.length', 1)\n      .first()\n      .should('contain', 'uploads an image');\n\n    getSearchInput()\n      .clear()\n      .type('/pet/{petId}/uploadImage', { force: true, parseSpecialCharSequences: false });\n    cy.get('[role=search] [role=menuitem]')\n      .should('have.length', 1)\n      .first()\n      .should('contain', 'uploads an image');\n  });\n});\n"
  },
  {
    "path": "e2e/integration/standalone.e2e.ts",
    "content": "describe('Standalone bundle test', () => {\n  function baseCheck(name: string, url: string) {\n    describe(name, () => {\n      beforeEach(() => {\n        cy.visit(url);\n      });\n\n      it('Render and check no errors', () => {\n        cy.get('.api-info').should('exist');\n      });\n\n      it('Render and click all the menu items', () => {\n        cy.get('.menu-content li').click({ multiple: true, force: true });\n      });\n    });\n  }\n\n  baseCheck('OAS3 mode', 'e2e/standalone.html');\n  baseCheck('OAS3.1 mode', 'e2e/standalone-3-1.html');\n  baseCheck('OAS2 compatibility mode', 'e2e/standalone-compatibility.html');\n});\n"
  },
  {
    "path": "e2e/integration/urls.e2e.ts",
    "content": "describe('Supporting both operation/* and parent/*/operation* urls', () => {\n  beforeEach(() => {\n    cy.visit('e2e/standalone.html');\n  });\n\n  it('should supporting operation/* url', () => {\n    cy.url().then(loc => {\n      cy.visit(loc + '#operation/updatePet');\n      cy.get('li[data-item-id=\"tag/pet/operation/updatePet\"]').should('be.visible');\n    });\n  });\n\n  it('should supporting parent/*/operation url', () => {\n    cy.url().then(loc => {\n      cy.visit(loc + '#tag/pet/operation/addPet');\n      cy.get('li[data-item-id=\"tag/pet/operation/addPet\"]').should('be.visible');\n    });\n  });\n});\n"
  },
  {
    "path": "e2e/plugins/cy-ts-preprocessor.js",
    "content": "const wp = require('@cypress/webpack-preprocessor');\n\nconst webpackOptions = {\n  resolve: {\n    extensions: ['.ts', '.js'],\n  },\n  performance: false,\n  module: {\n    rules: [\n      {\n        test: /\\.ts$/,\n        exclude: [/node_modules/],\n        use: [\n          {\n            loader: 'esbuild-loader',\n            options: {\n              tsconfigRaw: require('../tsconfig.json'),\n            },\n          },\n        ],\n      },\n    ],\n  },\n};\n\nconst options = {\n  webpackOptions,\n};\n\nmodule.exports = wp(options);\n"
  },
  {
    "path": "e2e/plugins/index.js",
    "content": "const cypressTypeScriptPreprocessor = require('./cy-ts-preprocessor');\n\nmodule.exports = on => {\n  on('file:preprocessor', cypressTypeScriptPreprocessor);\n};\n"
  },
  {
    "path": "e2e/standalone-3-1.html",
    "content": "<html>\n\n<body>\n  <redoc spec-url=\"../demo/openapi-3-1.yaml\" native-scrollbars></redoc>\n  <script src=\"../bundles/redoc.standalone.js\"></script>\n</body>\n\n</html>\n"
  },
  {
    "path": "e2e/standalone-compatibility.html",
    "content": "<html>\n\n<body>\n  <redoc spec-url=\"../demo/swagger.yaml\"></redoc>\n  <script src=\"../bundles/redoc.standalone.js\"></script>\n</body>\n\n</html>\n"
  },
  {
    "path": "e2e/standalone.html",
    "content": "<html>\n\n<body>\n  <redoc spec-url=\"../demo/openapi.yaml\" native-scrollbars></redoc>\n  <script src=\"../bundles/redoc.standalone.js\"></script>\n</body>\n\n</html>"
  },
  {
    "path": "e2e/tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"module\": \"commonjs\",\n    \"moduleResolution\": \"node\",\n    \"target\": \"es2015\",\n    \"noImplicitAny\": false,\n    \"noUnusedLocals\": true,\n    \"noUnusedParameters\": true,\n    \"strictNullChecks\": true,\n    \"sourceMap\": true,\n    \"pretty\": true,\n    \"lib\": [\n      \"es2015\",\n      \"es2016\",\n      \"es2017\",\n      \"dom\"\n    ],\n    \"jsx\": \"react\",\n    \"types\": [\"cypress\"]\n  },\n  \"compileOnSave\": false,\n  \"include\": [\n    \"integration/*.ts\",\n    \"../node_modules/cypress\"\n  ]\n}\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"redoc\",\n  \"version\": \"2.5.2\",\n  \"description\": \"ReDoc\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git://github.com/Redocly/redoc\"\n  },\n  \"browserslist\": [\n    \"defaults\"\n  ],\n  \"engines\": {\n    \"node\": \">=6.9\",\n    \"npm\": \">=3.0.0\"\n  },\n  \"author\": \"Roman Hotsiy <gotsijroman@gmail.com>\",\n  \"license\": \"MIT\",\n  \"keywords\": [\n    \"OpenAPI\",\n    \"OpenAPI Specification\",\n    \"Swagger\",\n    \"JSON-Schema\",\n    \"API\",\n    \"REST\",\n    \"documentation\",\n    \"React.js\"\n  ],\n  \"main\": \"bundles/redoc.lib.js\",\n  \"browser\": \"bundles/redoc.browser.lib.js\",\n  \"types\": \"typings/index.d.ts\",\n  \"scripts\": {\n    \"start\": \"webpack serve --mode=development --env playground --hot --config demo/webpack.config.ts\",\n    \"start:prod\": \"webpack serve --env playground --mode=production --config demo/webpack.config.ts\",\n    \"start:benchmark\": \"webpack serve --mode=production --env.bench --config demo/webpack.config.ts\",\n    \"test\": \"npm run unit && npm run license-check\",\n    \"unit\": \"jest --coverage\",\n    \"test:update-snapshot\": \"jest --updateSnapshot\",\n    \"e2e\": \"cypress run\",\n    \"e2e-ci\": \"cypress run --record\",\n    \"bundlesize\": \"size-limit\",\n    \"ts-check\": \"tsc --noEmit --skipLibCheck\",\n    \"cy:open\": \"cypress open\",\n    \"bundle:clean\": \"rimraf bundles\",\n    \"bundle:standalone\": \"webpack --env production --env standalone --mode=production\",\n    \"bundle:lib\": \"webpack --mode=production && npm run declarations\",\n    \"bundle:browser\": \"webpack --env production --env browser --mode=production\",\n    \"bundle\": \"npm run bundle:clean && npm run bundle:lib && npm run bundle:browser && npm run bundle:standalone\",\n    \"declarations\": \"tsc --emitDeclarationOnly -p tsconfig.lib.json && cp -R src/types typings/\",\n    \"stats\": \"webpack --env production --env standalone --json --profile --mode=production > stats.json\",\n    \"prettier\": \"prettier --write \\\"src/**/*.{ts,tsx}\\\"\",\n    \"changelog\": \"conventional-changelog -p angular -i CHANGELOG.md -s -r 1\",\n    \"lint\": \"eslint --fix 'src/**/*.{js,ts,tsx}' --cache\",\n    \"benchmark\": \"node ./benchmark/benchmark.js\",\n    \"start:demo\": \"webpack serve --hot --config demo/webpack.config.ts --mode=development\",\n    \"build:demo\": \"webpack --mode=production --config demo/webpack.config.ts\",\n    \"publish-cdn\": \"scripts/publish-cdn.sh\",\n    \"deploy:demo\": \"aws s3 sync demo/dist s3://production-redoc-demo --acl=public-read\",\n    \"license-check\": \"license-checker --production --onlyAllow 'MIT;ISC;Apache-2.0;BSD;BSD-2-Clause;BSD-3-Clause;CC-BY-4.0;CC0-1.0;Python-2.0 ' --summary\",\n    \"docker:build\": \"docker build -f config/docker/Dockerfile -t redoc .\",\n    \"prepare\": \"husky install\",\n    \"pre-commit\": \"pretty-quick --staged && npm run lint\"\n  },\n  \"devDependencies\": {\n    \"@cfaester/enzyme-adapter-react-18\": \"^0.8.0\",\n    \"@cypress/webpack-preprocessor\": \"^5.17.1\",\n    \"@size-limit/file\": \"^11.1.4\",\n    \"@types/chai\": \"^4.2.18\",\n    \"@types/dompurify\": \"^2.2.2\",\n    \"@types/enzyme\": \"^3.10.5\",\n    \"@types/enzyme-to-json\": \"^1.5.3\",\n    \"@types/jest\": \"^29.5.6\",\n    \"@types/json-pointer\": \"^1.0.30\",\n    \"@types/lunr\": \"^2.3.3\",\n    \"@types/mark.js\": \"^8.11.5\",\n    \"@types/marked\": \"^4.0.3\",\n    \"@types/node\": \"^15.6.1\",\n    \"@types/prismjs\": \"^1.16.5\",\n    \"@types/prop-types\": \"^15.7.3\",\n    \"@types/react\": \"^18.0.0\",\n    \"@types/react-dom\": \"^18.0.0\",\n    \"@types/styled-components\": \"^5.1.1\",\n    \"@types/tapable\": \"^2.2.2\",\n    \"@types/webpack\": \"^5.28.0\",\n    \"@types/webpack-env\": \"^1.18.0\",\n    \"@types/yargs\": \"^17.0.0\",\n    \"@typescript-eslint/eslint-plugin\": \"^5.55.0\",\n    \"@typescript-eslint/parser\": \"^5.55.0\",\n    \"beautify-benchmark\": \"^0.2.4\",\n    \"conventional-changelog-cli\": \"^3.0.0\",\n    \"copy-webpack-plugin\": \"^9.0.0\",\n    \"core-js\": \"^3.13.1\",\n    \"css-loader\": \"^5.2.6\",\n    \"cypress\": \"^13.8.1\",\n    \"enzyme\": \"^3.11.0\",\n    \"enzyme-to-json\": \"^3.6.2\",\n    \"esbuild-loader\": \"^4.3.0\",\n    \"eslint\": \"^7.27.0\",\n    \"eslint-plugin-import\": \"^2.23.4\",\n    \"eslint-plugin-react\": \"^7.34.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.2\",\n    \"fork-ts-checker-webpack-plugin\": \"^6.2.10\",\n    \"html-webpack-plugin\": \"^5.3.1\",\n    \"husky\": \"^7.0.0\",\n    \"jest\": \"^29.7.0\",\n    \"jest-environment-jsdom\": \"^29.7.0\",\n    \"js-yaml\": \"^4.1.0\",\n    \"license-checker\": \"^25.0.1\",\n    \"lodash.noop\": \"^3.0.1\",\n    \"mobx\": \"^6.10.2\",\n    \"outdent\": \"^0.8.0\",\n    \"prettier\": \"^2.3.2\",\n    \"pretty-quick\": \"^3.0.0\",\n    \"raf\": \"^3.4.1\",\n    \"react\": \"^18.0.0\",\n    \"react-dom\": \"^18.0.0\",\n    \"rimraf\": \"^3.0.2\",\n    \"shelljs\": \"^0.8.4\",\n    \"size-limit\": \"^11.1.4\",\n    \"style-loader\": \"^3.3.1\",\n    \"styled-components\": \"^5.3.0\",\n    \"ts-jest\": \"^29.1.1\",\n    \"ts-node\": \"^10.9.1\",\n    \"tslib\": \"^2.4.0\",\n    \"typescript\": \"^4.9.0\",\n    \"unfetch\": \"^4.2.0\",\n    \"url\": \"^0.11.1\",\n    \"webpack\": \"^5.94.0\",\n    \"webpack-cli\": \"^5.1.4\",\n    \"webpack-dev-server\": \"^5.2.1\",\n    \"webpack-node-externals\": \"^3.0.0\",\n    \"workerize-loader\": \"github:redocly/workerize-loader#webpack-5-dist\"\n  },\n  \"peerDependencies\": {\n    \"core-js\": \"^3.1.4\",\n    \"mobx\": \"^6.0.4\",\n    \"react\": \"^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0\",\n    \"react-dom\": \"^16.8.4 || ^17.0.0 || ^18.0.0 || ^19.0.0\",\n    \"styled-components\": \"^4.1.1 || ^5.1.1 || ^6.0.5\"\n  },\n  \"dependencies\": {\n    \"@redocly/openapi-core\": \"^1.4.0\",\n    \"classnames\": \"^2.3.2\",\n    \"decko\": \"^1.2.0\",\n    \"dompurify\": \"^3.2.4\",\n    \"eventemitter3\": \"^5.0.1\",\n    \"json-pointer\": \"^0.6.2\",\n    \"lunr\": \"^2.3.9\",\n    \"mark.js\": \"^8.11.1\",\n    \"marked\": \"^4.3.0\",\n    \"mobx-react\": \"9.2.0\",\n    \"openapi-sampler\": \"^1.6.2\",\n    \"path-browserify\": \"^1.0.1\",\n    \"perfect-scrollbar\": \"^1.5.5\",\n    \"polished\": \"^4.2.2\",\n    \"prismjs\": \"^1.29.0\",\n    \"prop-types\": \"^15.8.1\",\n    \"react-tabs\": \"^6.0.2\",\n    \"slugify\": \"~1.4.7\",\n    \"stickyfill\": \"^1.1.1\",\n    \"swagger2openapi\": \"^7.0.8\",\n    \"url-template\": \"^2.0.8\"\n  },\n  \"overrides\": {\n    \"tmp\": \">=0.2.4\"\n  },\n  \"size-limit\": [\n    {\n      \"path\": \"./bundles/redoc.standalone.js\",\n      \"limit\": \"350 kB\"\n    },\n    {\n      \"path\": \"./bundles/redoc.lib.js\",\n      \"limit\": \"100 kB\"\n    },\n    {\n      \"path\": \"./bundles/redoc.browser.lib.js\",\n      \"limit\": \"100 kB\"\n    }\n  ],\n  \"jest\": {\n    \"testEnvironment\": \"jsdom\",\n    \"setupFilesAfterEnv\": [\n      \"<rootDir>/src/setupTests.ts\"\n    ],\n    \"preset\": \"ts-jest\",\n    \"collectCoverageFrom\": [\n      \"src/**/*.{ts,tsx}\"\n    ],\n    \"coverageReporters\": [\n      \"json\",\n      \"lcov\",\n      \"text-summary\"\n    ],\n    \"coveragePathIgnorePatterns\": [\n      \"\\\\.d\\\\.ts$\",\n      \"/benchmark/\",\n      \"/node_modules/\",\n      \"src/services/__tests__/models/helpers.ts\"\n    ],\n    \"modulePathIgnorePatterns\": [\n      \"/benchmark/\",\n      \"src/services/__tests__/models/helpers.ts\"\n    ],\n    \"snapshotSerializers\": [\n      \"enzyme-to-json/serializer\"\n    ],\n    \"moduleNameMapper\": {\n      \"\\\\.(css|less)$\": \"<rootDir>/src/empty.js\"\n    }\n  },\n  \"prettier\": {\n    \"singleQuote\": true,\n    \"trailingComma\": \"all\",\n    \"printWidth\": 100,\n    \"arrowParens\": \"avoid\"\n  }\n}\n"
  },
  {
    "path": "scripts/invalidate-cache.sh",
    "content": "#!/usr/bin/env bash\n\nset -e                                      # exit on error\n\necho jsdelivr clearing cache\ncurl -i -X POST https://purge.jsdelivr.net/ \\\n -H 'cache-control: no-cache' \\\n -H 'content-type: application/json' \\\n -d '{\n      \"path\": [\n        \"npm/redoc@latest/bundles/redoc.browser.lib.js\",\n        \"npm/redoc@latest/bundles/redoc.lib.js\",\n        \"npm/redoc@latest/bundles/redoc.standalone.js\"\n      ]\n    }'\n\necho\necho start invalidate cloudfront\n\naws cloudfront create-invalidation --distribution-id $DISTRIBUTION --paths \"/redoc/*\"\n\necho Cache cleared successfully\n\nexit 0"
  },
  {
    "path": "scripts/publish-cdn.sh",
    "content": "#!/usr/bin/env bash\n\nset -e   # exit on error\n\n# TODO: Update script!\n\nVERSION=$(node scripts/version.js)\nVERSION_TAG=v${VERSION:0:1}.x\n\ncopy_to_s3 () {\n  aws s3 cp --exclude \"*\" --include \"*.js\" --content-type \"application/javascript; charset=utf-8\" bundles \"s3://redocly-cdn/redoc/$1/bundles\" --recursive\n  aws s3 cp --exclude \"*\" --include \"*.map\" --content-type \"application/json\" bundles \"s3://redocly-cdn/redoc/$1/bundles\" --recursive\n  aws s3 cp --exclude \"*\" --include \"*.txt\" bundles \"s3://redocly-cdn/redoc/$1/bundles\" --recursive\n  aws s3 cp CHANGELOG.md \"s3://redocly-cdn/redoc/$1/CHANGELOG.md\"\n  aws s3 cp LICENSE \"s3://redocly-cdn/redoc/$1/LICENSE\"\n  aws s3 cp package.json \"s3://redocly-cdn/redoc/$1/package.json\"\n  aws s3 cp README.md \"s3://redocly-cdn/redoc/$1/README.md\"\n}\n\nif aws s3 ls \"redocly-cdn/redoc/v$VERSION/\" \"$@\"; then\n  echo \"Version $VERSION already exists\"\n  exit 1\nelse\n  echo Releasing $VERSION\n\n  echo Uploading to S3 $VERSION\n  copy_to_s3 \"v$VERSION\"\n\n  echo Uploading to S3 $VERSION_TAG\n  copy_to_s3 \"$VERSION_TAG\" $@\n\n  if [[ \"$VERSION_TAG\" == \"v2.x\" ]]; then\n    echo Uploading to S3 latest\n    copy_to_s3 latest $@\n  fi\n\n  echo\n  echo Deployed successfully\n  exit 0\nfi\n"
  },
  {
    "path": "scripts/version.js",
    "content": "console.log(require('../package.json').version);\n"
  },
  {
    "path": "src/__tests__/ssr.test.tsx",
    "content": "/* tslint:disable:no-implicit-dependencies */\n\nimport * as React from 'react';\nimport { renderToString } from 'react-dom/server';\nimport * as yaml from 'js-yaml';\nimport { createStore, Redoc } from '../';\n\nimport { readFileSync } from 'fs';\nimport { resolve } from 'path';\n\ndescribe('SSR', () => {\n  it('should render in SSR mode', async () => {\n    const spec = yaml.load(readFileSync(resolve(__dirname, '../../demo/openapi.yaml'), 'utf-8'));\n    const store = await createStore(spec, '');\n    expect(() => {\n      renderToString(<Redoc store={store} />);\n    }).not.toThrow();\n  });\n});\n"
  },
  {
    "path": "src/__tests__/standalone.test.tsx",
    "content": "/* tslint:disable:no-implicit-dependencies */\nimport { mount } from 'enzyme';\nimport * as React from 'react';\nimport * as yaml from 'js-yaml';\n\nimport { readFileSync } from 'fs';\nimport { resolve } from 'path';\n\nimport { Loading, RedocStandalone } from '../components/';\n\ndescribe('Components', () => {\n  describe('RedocStandalone', () => {\n    test('should show loading first', () => {\n      const spec = yaml.load(readFileSync(resolve(__dirname, '../../demo/openapi.yaml'), 'utf-8'));\n\n      const inst = mount(<RedocStandalone spec={spec} options={{}} />);\n      expect(inst.find(Loading)).toHaveLength(1);\n    });\n  });\n});\n"
  },
  {
    "path": "src/common-elements/CopyButtonWrapper.tsx",
    "content": "import * as React from 'react';\nimport { Tooltip } from '../common-elements/Tooltip';\n\nimport { ClipboardService } from '../services/ClipboardService';\n\nexport interface CopyButtonWrapperProps {\n  data: any;\n  children: (props: { renderCopyButton: () => React.ReactNode }) => React.ReactNode;\n}\n\nexport const CopyButtonWrapper = (\n  props: CopyButtonWrapperProps & { tooltipShown?: boolean },\n): JSX.Element => {\n  const [tooltipShown, setTooltipShown] = React.useState(false);\n\n  const copy = () => {\n    const content =\n      typeof props.data === 'string' ? props.data : JSON.stringify(props.data, null, 2);\n    ClipboardService.copyCustom(content);\n    showTooltip();\n  };\n\n  const renderCopyButton = () => {\n    return (\n      <button onClick={copy}>\n        <Tooltip\n          title={ClipboardService.isSupported() ? 'Copied' : 'Not supported in your browser'}\n          open={tooltipShown}\n        >\n          Copy\n        </Tooltip>\n      </button>\n    );\n  };\n\n  const showTooltip = () => {\n    setTooltipShown(true);\n\n    setTimeout(() => {\n      setTooltipShown(false);\n    }, 1500);\n  };\n  return props.children({ renderCopyButton: renderCopyButton }) as JSX.Element;\n};\n"
  },
  {
    "path": "src/common-elements/Dropdown/Dropdown.tsx",
    "content": "import * as React from 'react';\nimport styled from '../../styled-components';\nimport { ArrowIconProps, DropdownProps, DropdownOption } from './types';\n\nconst ArrowSvg = ({ className, style }: ArrowIconProps): JSX.Element => (\n  <svg\n    className={className}\n    style={style}\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"16\"\n    height=\"16\"\n    viewBox=\"0 0 24 24\"\n    fill=\"none\"\n    stroke=\"currentColor\"\n    strokeWidth=\"2\"\n    strokeLinecap=\"round\"\n    strokeLinejoin=\"round\"\n  >\n    <polyline points=\"6 9 12 15 18 9\" />\n  </svg>\n);\n\nconst ArrowIcon = styled(ArrowSvg)`\n  position: absolute;\n  pointer-events: none;\n  z-index: 1;\n  top: 50%;\n  -webkit-transform: translateY(-50%);\n  -ms-transform: translateY(-50%);\n  transform: translateY(-50%);\n  right: 8px;\n  margin: auto;\n  text-align: center;\n  polyline {\n    color: ${props => props.variant === 'dark' && 'white'};\n  }\n`;\n\nconst DropdownComponent = (props: DropdownProps): JSX.Element => {\n  const { options, onChange, placeholder, value = '', variant, className } = props;\n\n  const handleOnChange = event => {\n    const { selectedIndex } = event.target;\n    const index = placeholder ? selectedIndex - 1 : selectedIndex;\n    onChange(options[index]);\n  };\n\n  return (\n    <div className={className}>\n      <ArrowIcon variant={variant} />\n      <select onChange={handleOnChange} value={value} className=\"dropdown-select\">\n        {placeholder && (\n          <option disabled hidden value={placeholder}>\n            {placeholder}\n          </option>\n        )}\n        {options.map(({ idx, value, title }: DropdownOption, index) => (\n          <option key={idx || value + index} value={value}>\n            {title || value}\n          </option>\n        ))}\n      </select>\n      <label>{value}</label>\n    </div>\n  );\n};\n\nexport const Dropdown = React.memo<DropdownProps>(DropdownComponent);\n"
  },
  {
    "path": "src/common-elements/Dropdown/index.ts",
    "content": "export * from './styled';\nexport * from './types';\n"
  },
  {
    "path": "src/common-elements/Dropdown/styled.ts",
    "content": "import styled from 'styled-components';\n\nimport { Dropdown as DropdownComponent } from './Dropdown';\n\nexport const Dropdown = styled(DropdownComponent)<{\n  fullWidth?: boolean;\n}>`\n  label {\n    box-sizing: border-box;\n    min-width: 100px;\n    outline: none;\n    display: inline-block;\n    font-family: ${props => props.theme.typography.headings.fontFamily};\n    color: ${({ theme }) => theme.colors.text.primary};\n    vertical-align: bottom;\n    width: ${({ fullWidth }) => (fullWidth ? '100%' : 'auto')};\n    text-transform: none;\n    padding: 0 22px 0 4px;\n\n    font-size: 0.929em;\n    line-height: 1.5em;\n    font-family: inherit;\n    text-overflow: ellipsis;\n    overflow: hidden;\n    white-space: nowrap;\n  }\n  .dropdown-select {\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n    opacity: 0;\n    border: none;\n    appearance: none;\n    cursor: pointer;\n\n    color: ${({ theme }) => theme.colors.text.primary};\n    line-height: inherit;\n    font-family: inherit;\n  }\n  box-sizing: border-box;\n  min-width: 100px;\n  outline: none;\n  display: inline-block;\n  border-radius: 2px;\n  border: 1px solid rgba(38, 50, 56, 0.5);\n  vertical-align: bottom;\n  padding: 2px 0px 2px 6px;\n  position: relative;\n  width: auto;\n  background: white;\n  color: #263238;\n  font-family: ${props => props.theme.typography.headings.fontFamily};\n  font-size: 0.929em;\n  line-height: 1.5em;\n  cursor: pointer;\n  transition: border 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;\n\n  &:hover,\n  &:focus-within {\n    border: 1px solid ${props => props.theme.colors.primary.main};\n    color: ${props => props.theme.colors.primary.main};\n    box-shadow: 0px 0px 0px 1px ${props => props.theme.colors.primary.main};\n  }\n`;\n\nexport const SimpleDropdown = styled(Dropdown)`\n  margin-left: 10px;\n  text-transform: none;\n  font-size: 0.969em;\n\n  font-size: 1em;\n  border: none;\n  padding: 0 1.2em 0 0;\n  background: transparent;\n\n  &:hover,\n  &:focus-within {\n    border: none;\n    box-shadow: none;\n    label {\n      color: ${props => props.theme.colors.primary.main};\n      text-shadow: 0px 0px 0px ${props => props.theme.colors.primary.main};\n    }\n  }\n`;\n\nexport const MimeLabel = styled.span`\n  margin-left: 10px;\n  text-transform: none;\n  font-size: 0.929em;\n  color: black;\n`;\n"
  },
  {
    "path": "src/common-elements/Dropdown/types.ts",
    "content": "export interface DropdownOption {\n  idx?: number;\n  value: string;\n  title?: string;\n  serverUrl?: string;\n  label?: string;\n}\n\nexport interface DropdownProps {\n  options: DropdownOption[];\n  onChange: (option: DropdownOption) => void;\n  ariaLabel?: string;\n  className?: string;\n  placeholder?: string;\n  value?: string;\n  dense?: boolean;\n  fullWidth?: boolean;\n  variant?: 'dark' | 'light';\n}\n\nexport interface ArrowIconProps {\n  className?: string;\n  variant?: 'light' | 'dark';\n  style?: React.CSSProperties;\n}\n"
  },
  {
    "path": "src/common-elements/PrismDiv.tsx",
    "content": "import styled, { extensionsHook } from '../styled-components';\n\nexport const PrismDiv = styled.div`\n  /**\n  * Based on prism-dark.css\n  */\n\n  code[class*='language-'],\n  pre[class*='language-'] {\n    /* color: white;\n    background: none; */\n    text-shadow: 0 -0.1em 0.2em black;\n    text-align: left;\n    white-space: pre;\n    word-spacing: normal;\n    word-break: normal;\n    word-wrap: normal;\n    line-height: 1.5;\n\n    -moz-tab-size: 4;\n    -o-tab-size: 4;\n    tab-size: 4;\n\n    -webkit-hyphens: none;\n    -moz-hyphens: none;\n    -ms-hyphens: none;\n    hyphens: none;\n  }\n\n  @media print {\n    code[class*='language-'],\n    pre[class*='language-'] {\n      text-shadow: none;\n    }\n  }\n\n  /* Code blocks */\n  pre[class*='language-'] {\n    padding: 1em;\n    margin: 0.5em 0;\n    overflow: auto;\n  }\n\n  .token.comment,\n  .token.prolog,\n  .token.doctype,\n  .token.cdata {\n    color: hsl(30, 20%, 50%);\n  }\n\n  .token.punctuation {\n    opacity: 0.7;\n  }\n\n  .namespace {\n    opacity: 0.7;\n  }\n\n  .token.property,\n  .token.tag,\n  .token.number,\n  .token.constant,\n  .token.symbol {\n    color: #4a8bb3;\n  }\n\n  .token.boolean {\n    color: #e64441;\n  }\n\n  .token.selector,\n  .token.attr-name,\n  .token.string,\n  .token.char,\n  .token.builtin,\n  .token.inserted {\n    color: #a0fbaa;\n    & + a,\n    & + a:visited {\n      color: #4ed2ba;\n      text-decoration: underline;\n    }\n  }\n\n  .token.property.string {\n    color: white;\n  }\n\n  .token.operator,\n  .token.entity,\n  .token.url,\n  .token.variable {\n    color: hsl(40, 90%, 60%);\n  }\n\n  .token.atrule,\n  .token.attr-value,\n  .token.keyword {\n    color: hsl(350, 40%, 70%);\n  }\n\n  .token.regex,\n  .token.important {\n    color: #e90;\n  }\n\n  .token.important,\n  .token.bold {\n    font-weight: bold;\n  }\n  .token.italic {\n    font-style: italic;\n  }\n\n  .token.entity {\n    cursor: help;\n  }\n\n  .token.deleted {\n    color: red;\n  }\n\n  ${extensionsHook('Prism')};\n`;\n"
  },
  {
    "path": "src/common-elements/Tooltip.tsx",
    "content": "import * as React from 'react';\n\nimport styled from '../styled-components';\n\nconst Wrapper = styled.div`\n  position: relative;\n`;\n\nconst Tip = styled.div`\n  position: absolute;\n  min-width: 80px;\n  max-width: 500px;\n  background: #fff;\n  bottom: 100%;\n  left: 50%;\n  margin-bottom: 10px;\n  transform: translateX(-50%);\n\n  border-radius: 4px;\n  padding: 0.3em 0.6em;\n  text-align: center;\n  box-shadow: 0px 0px 5px 0px rgba(204, 204, 204, 1);\n`;\n\nconst Content = styled.div`\n  background: #fff;\n  color: #000;\n  display: inline;\n  font-size: 0.85em;\n  white-space: nowrap;\n`;\n\nconst Arrow = styled.div`\n  position: absolute;\n  width: 0;\n  height: 0;\n  bottom: -5px;\n  left: 50%;\n  margin-left: -5px;\n  border-left: solid transparent 5px;\n  border-right: solid transparent 5px;\n  border-top: solid #fff 5px;\n`;\n\nconst Gap = styled.div`\n  position: absolute;\n  width: 100%;\n  height: 20px;\n  bottom: -20px;\n`;\n\nexport interface TooltipProps extends React.PropsWithChildren<any> {\n  open: boolean;\n  title: string;\n}\n\nexport class Tooltip extends React.Component<TooltipProps> {\n  render() {\n    const { open, title, children } = this.props;\n    return (\n      <Wrapper>\n        {children}\n        {open && (\n          <Tip>\n            <Content>{title}</Content>\n            <Arrow />\n            <Gap />\n          </Tip>\n        )}\n      </Wrapper>\n    );\n  }\n}\n"
  },
  {
    "path": "src/common-elements/fields-layout.ts",
    "content": "import styled, { extensionsHook, media, css } from '../styled-components';\nimport { deprecatedCss } from './mixins';\n\nexport const PropertiesTableCaption = styled.caption`\n  text-align: right;\n  font-size: 0.9em;\n  font-weight: normal;\n  color: ${props => props.theme.colors.text.secondary};\n`;\n\nexport const PropertyCell = styled.td<{ kind?: string }>`\n  border-left: 1px solid ${props => props.theme.schema.linesColor};\n  box-sizing: border-box;\n  position: relative;\n  padding: 10px 10px 10px 0;\n\n  ${media.lessThan('small')`\n    display: block;\n    overflow: hidden;\n  `}\n\n  tr:first-of-type > &,\n  tr.last > & {\n    border-left-width: 0;\n    background-position: top left;\n    background-repeat: no-repeat;\n    background-size: 1px 100%;\n  }\n\n  tr:first-of-type > & {\n    background-image: linear-gradient(\n      to bottom,\n      transparent 0%,\n      transparent 22px,\n      ${props => props.theme.schema.linesColor} 22px,\n      ${props => props.theme.schema.linesColor} 100%\n    );\n  }\n\n  tr.last > & {\n    background-image: linear-gradient(\n      to bottom,\n      ${props => props.theme.schema.linesColor} 0%,\n      ${props => props.theme.schema.linesColor} 22px,\n      transparent 22px,\n      transparent 100%\n    );\n  }\n\n  tr.last + tr > & {\n    border-left-color: transparent;\n  }\n\n  tr.last:first-child > & {\n    background: none;\n    border-left-color: transparent;\n  }\n`;\n\nexport const PropertyCellWithInner = styled(PropertyCell)`\n  padding: 0;\n`;\n\nexport const PropertyNameCell = styled(PropertyCell)`\n  vertical-align: top;\n  line-height: 20px;\n  white-space: nowrap;\n  font-size: 13px;\n  font-family: ${props => props.theme.typography.code.fontFamily};\n\n  &.deprecated {\n    ${deprecatedCss};\n  }\n\n  ${({ kind }) =>\n    kind === 'patternProperties' &&\n    css`\n      > span.property-name {\n        display: inline-table;\n        white-space: break-spaces;\n        margin-right: 20px;\n\n        ::before,\n        ::after {\n          content: '/';\n          filter: opacity(0.2);\n        }\n      }\n    `}\n\n  ${({ kind = '' }) =>\n    ['field', 'additionalProperties', 'patternProperties'].includes(kind)\n      ? ''\n      : 'font-style: italic'};\n\n  ${extensionsHook('PropertyNameCell')};\n`;\n\nexport const PropertyDetailsCell = styled.td`\n  border-bottom: 1px solid #9fb4be;\n  padding: 10px 0;\n  width: ${props => props.theme.schema.defaultDetailsWidth};\n  box-sizing: border-box;\n\n  tr.expanded & {\n    border-bottom: none;\n  }\n\n  ${media.lessThan('small')`\n    padding: 0 20px;\n    border-bottom: none;\n    border-left: 1px solid ${props => props.theme.schema.linesColor};\n\n    tr.last > & {\n      border-left: none;\n    }\n  `}\n\n  ${extensionsHook('PropertyDetailsCell')};\n`;\n\nexport const PropertyBullet = styled.span`\n  color: ${props => props.theme.schema.linesColor};\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  margin-right: 10px;\n\n  &::before {\n    content: '';\n    display: inline-block;\n    vertical-align: middle;\n    width: 10px;\n    height: 1px;\n    background: ${props => props.theme.schema.linesColor};\n  }\n\n  &::after {\n    content: '';\n    display: inline-block;\n    vertical-align: middle;\n    width: 1px;\n    background: ${props => props.theme.schema.linesColor};\n    height: 7px;\n  }\n`;\n\nexport const InnerPropertiesWrap = styled.div`\n  padding: ${({ theme }) => theme.schema.nestingSpacing};\n`;\n\nexport const PropertiesTable = styled.table`\n  border-collapse: separate;\n  border-radius: 3px;\n  font-size: ${props => props.theme.typography.fontSize};\n\n  border-spacing: 0;\n  width: 100%;\n\n  > tr {\n    vertical-align: middle;\n  }\n\n  ${media.lessThan('small')`\n    display: block;\n    > tr, > tbody > tr {\n      display: block;\n    }\n  `}\n\n  ${media.lessThan('small', false, ' and (-ms-high-contrast:none)')`\n    td {\n      float: left;\n      width: 100%;\n    }\n  `}\n\n  &\n    ${InnerPropertiesWrap},\n    &\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap},\n    &\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap} {\n    margin: ${({ theme }) => theme.schema.nestingSpacing};\n    margin-right: 0;\n    background: ${({ theme }) => theme.schema.nestedBackground};\n  }\n\n  &\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap},\n    &\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap},\n    &\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap}\n    ${InnerPropertiesWrap} {\n    background: #ffffff;\n  }\n`;\n"
  },
  {
    "path": "src/common-elements/fields.ts",
    "content": "import { transparentize } from 'polished';\n\nimport styled, { css, extensionsHook } from '../styled-components';\nimport { PropertyNameCell } from './fields-layout';\nimport { deprecatedCss } from './mixins';\nimport { ShelfIcon } from './shelfs';\n\nexport const ClickablePropertyNameCell = styled(PropertyNameCell)`\n  &.deprecated {\n    span.property-name {\n      ${deprecatedCss}\n    }\n  }\n\n  button {\n    background-color: transparent;\n    border: 0;\n    outline: 0;\n    font-size: 13px;\n    font-family: ${props => props.theme.typography.code.fontFamily};\n    cursor: pointer;\n    padding: 0;\n    color: ${props => props.theme.colors.text.primary};\n    &:focus {\n      font-weight: ${({ theme }) => theme.typography.fontWeightBold};\n    }\n    ${({ kind }) =>\n      kind === 'patternProperties' &&\n      css`\n        display: inline-flex;\n        margin-right: 20px;\n\n        > span.property-name {\n          white-space: break-spaces;\n          text-align: left;\n\n          ::before,\n          ::after {\n            content: '/';\n            filter: opacity(0.2);\n          }\n        }\n\n        > svg {\n          align-self: center;\n        }\n      `}\n  }\n  ${ShelfIcon} {\n    height: ${({ theme }) => theme.schema.arrow.size};\n    width: ${({ theme }) => theme.schema.arrow.size};\n    polygon {\n      fill: ${({ theme }) => theme.schema.arrow.color};\n    }\n  }\n`;\n\nexport const FieldLabel = styled.span`\n  vertical-align: middle;\n  font-size: ${({ theme }) => theme.typography.code.fontSize};\n  line-height: 20px;\n`;\n\nexport const TypePrefix = styled(FieldLabel)`\n  color: ${props => transparentize(0.1, props.theme.schema.typeNameColor)};\n`;\n\nexport const TypeName = styled(FieldLabel)`\n  color: ${props => props.theme.schema.typeNameColor};\n`;\n\nexport const TypeTitle = styled(FieldLabel)`\n  color: ${props => props.theme.schema.typeTitleColor};\n  word-break: break-word;\n`;\n\nexport const TypeFormat = TypeName;\n\nexport const RequiredLabel = styled(FieldLabel).attrs({\n  as: 'div',\n})`\n  color: ${props => props.theme.schema.requireLabelColor};\n  font-size: ${props => props.theme.schema.labelsTextSize};\n  font-weight: normal;\n  margin-left: 20px;\n  line-height: 1;\n`;\n\nexport const PropertyLabel = styled(RequiredLabel)`\n  color: ${props => props.theme.colors.primary.light};\n`;\n\nexport const RecursiveLabel = styled(FieldLabel)`\n  color: ${({ theme }) => theme.colors.warning.main};\n  font-size: 13px;\n`;\n\nexport const PatternLabel = styled(FieldLabel)`\n  color: #0e7c86;\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  font-size: 12px;\n  &::before,\n  &::after {\n    content: ' ';\n  }\n`;\n\nexport const ExampleValue = styled(FieldLabel)`\n  border-radius: 2px;\n  word-break: break-word;\n  ${({ theme }) => `\n    background-color: ${transparentize(0.95, theme.colors.text.primary)};\n    color: ${transparentize(0.1, theme.colors.text.primary)};\n\n    padding: 0 ${theme.spacing.unit}px;\n    border: 1px solid ${transparentize(0.9, theme.colors.text.primary)};\n    font-family: ${theme.typography.code.fontFamily};\n}`};\n  & + & {\n    margin-left: 0;\n  }\n  ${extensionsHook('ExampleValue')};\n`;\n\nexport const ExtensionValue = styled(ExampleValue)``;\n\nexport const ConstraintItem = styled(FieldLabel)`\n  border-radius: 2px;\n  ${({ theme }) => `\n    background-color: ${transparentize(0.95, theme.colors.primary.light)};\n    color: ${transparentize(0.1, theme.colors.primary.main)};\n\n    margin: 0 ${theme.spacing.unit}px;\n    padding: 0 ${theme.spacing.unit}px;\n    border: 1px solid ${transparentize(0.9, theme.colors.primary.main)};\n}`};\n  & + & {\n    margin-left: 0;\n  }\n  ${extensionsHook('ConstraintItem')};\n`;\n\nexport const ToggleButton = styled.button`\n  background-color: transparent;\n  border: 0;\n  color: ${({ theme }) => theme.colors.text.secondary};\n  margin-left: ${({ theme }) => theme.spacing.unit}px;\n  border-radius: 2px;\n  cursor: pointer;\n  outline-color: ${({ theme }) => theme.colors.text.secondary};\n  font-size: 12px;\n`;\n"
  },
  {
    "path": "src/common-elements/headers.ts",
    "content": "import styled, { css, extensionsHook } from '../styled-components';\n\nconst headerFontSize = {\n  1: '1.85714em',\n  2: '1.57143em',\n  3: '1.27em',\n};\n\nexport const headerCommonMixin = level => css`\n  font-family: ${({ theme }) => theme.typography.headings.fontFamily};\n  font-weight: ${({ theme }) => theme.typography.headings.fontWeight};\n  font-size: ${headerFontSize[level]};\n  line-height: ${({ theme }) => theme.typography.headings.lineHeight};\n`;\n\nexport const H1 = styled.h1`\n  ${headerCommonMixin(1)};\n  color: ${({ theme }) => theme.colors.text.primary};\n\n  ${extensionsHook('H1')};\n`;\n\nexport const H2 = styled.h2`\n  ${headerCommonMixin(2)};\n  color: ${({ theme }) => theme.colors.text.primary};\n  margin: 0 0 20px;\n\n  ${extensionsHook('H2')};\n`;\n\nexport const H3 = styled.h2`\n  ${headerCommonMixin(3)};\n  color: ${({ theme }) => theme.colors.text.primary};\n\n  ${extensionsHook('H3')};\n`;\n\nexport const RightPanelHeader = styled.h3`\n  color: ${({ theme }) => theme.rightPanel.textColor};\n\n  ${extensionsHook('RightPanelHeader')};\n`;\n\nexport const UnderlinedHeader = styled.h5`\n  border-bottom: 1px solid rgba(38, 50, 56, 0.3);\n  margin: 1em 0 1em 0;\n  color: rgba(38, 50, 56, 0.5);\n  font-weight: normal;\n  text-transform: uppercase;\n  font-size: 0.929em;\n  line-height: 20px;\n\n  ${extensionsHook('UnderlinedHeader')};\n`;\n"
  },
  {
    "path": "src/common-elements/index.ts",
    "content": "export * from './panels';\nexport * from './headers';\nexport * from './linkify';\nexport * from './shelfs';\nexport * from './fields-layout';\nexport * from './schema';\nexport * from './mixins';\nexport * from './tabs';\nexport * from './samples';\nexport * from './perfect-scrollbar';\nexport * from './Dropdown';\n"
  },
  {
    "path": "src/common-elements/linkify.tsx",
    "content": "import * as React from 'react';\n\nimport { StoreContext } from '../components/StoreBuilder';\nimport styled, { css } from '../styled-components';\n\nimport { HistoryService } from '../services';\n\n// tslint:disable-next-line\nexport const linkifyMixin = className => css`\n  ${className} {\n    cursor: pointer;\n    margin-left: -20px;\n    padding: 0;\n    line-height: 1;\n    width: 20px;\n    display: inline-block;\n    outline: 0;\n  }\n  ${className}:before {\n    content: '';\n    width: 15px;\n    height: 15px;\n    background-size: contain;\n    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBmaWxsPSIjMDEwMTAxIiBkPSJNNDU5LjcgMjMzLjRsLTkwLjUgOTAuNWMtNTAgNTAtMTMxIDUwLTE4MSAwIC03LjktNy44LTE0LTE2LjctMTkuNC0yNS44bDQyLjEtNDIuMWMyLTIgNC41LTMuMiA2LjgtNC41IDIuOSA5LjkgOCAxOS4zIDE1LjggMjcuMiAyNSAyNSA2NS42IDI0LjkgOTAuNSAwbDkwLjUtOTAuNWMyNS0yNSAyNS02NS42IDAtOTAuNSAtMjQuOS0yNS02NS41LTI1LTkwLjUgMGwtMzIuMiAzMi4yYy0yNi4xLTEwLjItNTQuMi0xMi45LTgxLjYtOC45bDY4LjYtNjguNmM1MC01MCAxMzEtNTAgMTgxIDBDNTA5LjYgMTAyLjMgNTA5LjYgMTgzLjQgNDU5LjcgMjMzLjR6TTIyMC4zIDM4Mi4ybC0zMi4yIDMyLjJjLTI1IDI0LjktNjUuNiAyNC45LTkwLjUgMCAtMjUtMjUtMjUtNjUuNiAwLTkwLjVsOTAuNS05MC41YzI1LTI1IDY1LjUtMjUgOTAuNSAwIDcuOCA3LjggMTIuOSAxNy4yIDE1LjggMjcuMSAyLjQtMS40IDQuOC0yLjUgNi44LTQuNWw0Mi4xLTQyYy01LjQtOS4yLTExLjYtMTgtMTkuNC0yNS44IC01MC01MC0xMzEtNTAtMTgxIDBsLTkwLjUgOTAuNWMtNTAgNTAtNTAgMTMxIDAgMTgxIDUwIDUwIDEzMSA1MCAxODEgMGw2OC42LTY4LjZDMjc0LjYgMzk1LjEgMjQ2LjQgMzkyLjMgMjIwLjMgMzgyLjJ6Ii8+PC9zdmc+Cg==');\n    opacity: 0.5;\n    visibility: hidden;\n    display: inline-block;\n    vertical-align: middle;\n  }\n\n  h1:hover > ${className}::before, h2:hover > ${className}::before, ${className}:hover::before {\n    visibility: visible;\n  }\n`;\n\nconst isModifiedEvent = event =>\n  !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n\nexport function Link(props: { to: string; className?: string; children?: any }) {\n  const store = React.useContext(StoreContext);\n  const clickHandler = React.useCallback(\n    (event: React.MouseEvent<HTMLAnchorElement>) => {\n      if (!store) return;\n      navigate(store.menu.history, event, props.to);\n    },\n    [store, props.to],\n  );\n\n  if (!store) return null;\n\n  return (\n    <a\n      className={props.className}\n      href={store!.menu.history.linkForId(props.to)}\n      onClick={clickHandler}\n      aria-label={props.to}\n    >\n      {props.children}\n    </a>\n  );\n}\n\nfunction navigate(history: HistoryService, event: React.MouseEvent<HTMLAnchorElement>, to: string) {\n  if (\n    !event.defaultPrevented && // onClick prevented default\n    event.button === 0 && // ignore everything but left clicks\n    !isModifiedEvent(event) // ignore clicks with modifier keys\n  ) {\n    event.preventDefault();\n    history.replace(encodeURI(to));\n  }\n}\n\nconst StyledShareLink = styled(Link)`\n  ${linkifyMixin('&')};\n`;\n\nexport function ShareLink(props: { to: string }) {\n  return <StyledShareLink to={props.to} />;\n}\n"
  },
  {
    "path": "src/common-elements/mixins.ts",
    "content": "import { css } from '../styled-components';\n\nexport const deprecatedCss = css`\n  text-decoration: line-through;\n  color: #707070;\n`;\n"
  },
  {
    "path": "src/common-elements/panels.ts",
    "content": "import { SECTION_ATTR } from '../services/MenuStore';\nimport styled, { media } from '../styled-components';\n\nexport const MiddlePanel = styled.div<{ $compact?: boolean }>`\n  width: calc(100% - ${props => props.theme.rightPanel.width});\n  padding: 0 ${props => props.theme.spacing.sectionHorizontal}px;\n\n  ${({ $compact, theme }) =>\n    media.lessThan('medium', true)`\n    width: 100%;\n    padding: ${`${$compact ? 0 : theme.spacing.sectionVertical}px ${\n      theme.spacing.sectionHorizontal\n    }px`};\n  `};\n`;\n\nexport const Section = styled.div.attrs(props => ({\n  [SECTION_ATTR]: props.id,\n}))<{ $underlined?: boolean }>`\n  padding: ${props => props.theme.spacing.sectionVertical}px 0;\n\n  &:last-child {\n    min-height: calc(100vh + 1px);\n  }\n\n  & > &:last-child {\n    min-height: initial;\n  }\n\n  ${media.lessThan('medium', true)`\n    padding: 0;\n  `}\n  ${({ $underlined }) =>\n    ($underlined &&\n      `\n    position: relative;\n\n    &:not(:last-of-type):after {\n      position: absolute;\n      bottom: 0;\n      width: 100%;\n      display: block;\n      content: '';\n      border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n    }\n  `) ||\n    ''}\n`;\n\nexport const RightPanel = styled.div`\n  width: ${props => props.theme.rightPanel.width};\n  color: ${({ theme }) => theme.rightPanel.textColor};\n  background-color: ${props => props.theme.rightPanel.backgroundColor};\n  padding: 0 ${props => props.theme.spacing.sectionHorizontal}px;\n\n  ${media.lessThan('medium', true)`\n    width: 100%;\n    padding: ${props =>\n      `${props.theme.spacing.sectionVertical}px ${props.theme.spacing.sectionHorizontal}px`};\n  `};\n`;\n\nexport const DarkRightPanel = styled(RightPanel)`\n  background-color: ${props => props.theme.rightPanel.backgroundColor};\n`;\n\nexport const Row = styled.div`\n  display: flex;\n  width: 100%;\n  padding: 0;\n\n  ${media.lessThan('medium', true)`\n    flex-direction: column;\n  `};\n`;\n"
  },
  {
    "path": "src/common-elements/perfect-scrollbar.tsx",
    "content": "import * as React from 'react';\n\nimport PerfectScrollbarType, * as PerfectScrollbarNamespace from 'perfect-scrollbar';\n\nimport { OptionsContext } from '../components/OptionsProvider';\nimport styled, { createGlobalStyle } from '../styled-components';\nimport { IS_BROWSER } from '../utils';\n\n/*\n * perfect scrollbar umd bundle uses exports assignment while module uses default export\n * so when bundled with webpack default export works but with jest it crashes\n * That's why the following ugly fix is required\n */\nconst PerfectScrollbarConstructor =\n  PerfectScrollbarNamespace.default || (PerfectScrollbarNamespace as any as PerfectScrollbarType);\n\nlet psStyles = '';\nif (IS_BROWSER) {\n  psStyles = require('perfect-scrollbar/css/perfect-scrollbar.css');\n  psStyles = (typeof psStyles.toString === 'function' && psStyles.toString()) || '';\n  psStyles = psStyles === '[object Object]' ? '' : psStyles;\n}\n\nconst PSStyling = createGlobalStyle`${psStyles}`;\n\nconst StyledScrollWrapper = styled.div`\n  position: relative;\n`;\n\nexport interface PerfectScrollbarProps {\n  options?: PerfectScrollbarType.Options;\n  className?: string;\n  updateFn?: (fn) => void;\n}\n\nexport class PerfectScrollbar extends React.Component<\n  React.PropsWithChildren<PerfectScrollbarProps>\n> {\n  private _container: HTMLElement;\n  private inst: PerfectScrollbarType;\n\n  componentDidMount() {\n    const offset = (this._container.parentElement && this._container.parentElement.scrollTop) || 0;\n    this.inst = new PerfectScrollbarConstructor(this._container, this.props.options || {});\n    if (this._container.scrollTo) {\n      this._container.scrollTo(0, offset);\n    }\n  }\n\n  componentDidUpdate() {\n    this.inst.update();\n  }\n\n  componentWillUnmount() {\n    this.inst.destroy();\n  }\n\n  handleRef = ref => {\n    this._container = ref;\n  };\n\n  render() {\n    const { children, className, updateFn } = this.props;\n\n    if (updateFn) {\n      updateFn(this.componentDidUpdate.bind(this));\n    }\n\n    return (\n      <>\n        {psStyles && <PSStyling />}\n        <StyledScrollWrapper className={`scrollbar-container ${className}`} ref={this.handleRef}>\n          {children}\n        </StyledScrollWrapper>\n      </>\n    );\n  }\n}\n\nexport function PerfectScrollbarWrap(\n  props: PerfectScrollbarProps & { children: JSX.Element[] | JSX.Element },\n) {\n  return (\n    <OptionsContext.Consumer>\n      {options =>\n        !options.nativeScrollbars ? (\n          <PerfectScrollbar {...props}>{props.children}</PerfectScrollbar>\n        ) : (\n          <div\n            style={{\n              overflow: 'auto',\n              overscrollBehavior: 'contain',\n              msOverflowStyle: '-ms-autohiding-scrollbar',\n            }}\n          >\n            {props.children}\n          </div>\n        )\n      }\n    </OptionsContext.Consumer>\n  );\n}\n"
  },
  {
    "path": "src/common-elements/samples.tsx",
    "content": "import styled from '../styled-components';\nimport { PrismDiv } from './PrismDiv';\n\nexport const SampleControls = styled.div`\n  opacity: 0.7;\n  transition: opacity 0.3s ease;\n  text-align: right;\n  &:focus-within {\n    opacity: 1;\n  }\n  > button {\n    background-color: transparent;\n    border: 0;\n    color: inherit;\n    padding: 2px 10px;\n    font-family: ${({ theme }) => theme.typography.fontFamily};\n    font-size: ${({ theme }) => theme.typography.fontSize};\n    line-height: ${({ theme }) => theme.typography.lineHeight};\n    cursor: pointer;\n    outline: 0;\n\n    :hover,\n    :focus {\n      background: rgba(255, 255, 255, 0.1);\n    }\n  }\n`;\n\nexport const SampleControlsWrap = styled.div`\n  &:hover ${SampleControls} {\n    opacity: 1;\n  }\n`;\n\nexport const StyledPre = styled(PrismDiv).attrs({\n  as: 'pre',\n})`\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  font-size: ${props => props.theme.typography.code.fontSize};\n  overflow-x: auto;\n  margin: 0;\n\n  white-space: ${({ theme }) => (theme.typography.code.wrap ? 'pre-wrap' : 'pre')};\n`;\n"
  },
  {
    "path": "src/common-elements/schema.ts",
    "content": "import styled from '../styled-components';\nimport { darken } from 'polished';\nimport { deprecatedCss } from './mixins';\n\nexport const OneOfList = styled.div`\n  margin: 0 0 3px 0;\n  display: inline-block;\n`;\n\nexport const OneOfLabel = styled.span`\n  font-size: 0.9em;\n  margin-right: 10px;\n  color: ${props => props.theme.colors.primary.main};\n  font-family: ${props => props.theme.typography.headings.fontFamily};\n}\n`;\n\nexport const OneOfButton = styled.button<{ $active: boolean; $deprecated: boolean }>`\n  display: inline-block;\n  margin-right: 10px;\n  margin-bottom: 5px;\n  font-size: 0.8em;\n  cursor: pointer;\n  border: 1px solid ${props => props.theme.colors.primary.main};\n  padding: 2px 10px;\n  line-height: 1.5em;\n  outline: none;\n  &:focus {\n    box-shadow: 0 0 0 1px ${props => props.theme.colors.primary.main};\n  }\n\n  ${({ $deprecated }) => ($deprecated && deprecatedCss) || ''};\n\n  ${props => {\n    if (props.$active) {\n      return `\n      color: white;\n      background-color: ${props.theme.colors.primary.main};\n      &:focus {\n        box-shadow: none;\n        background-color: ${darken(0.15, props.theme.colors.primary.main)};\n      }\n      `;\n    } else {\n      return `\n        color: ${props.theme.colors.primary.main};\n        background-color: white;\n      `;\n    }\n  }}\n`;\n\nexport const ArrayOpenningLabel = styled.div`\n  font-size: 0.9em;\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  &::after {\n    content: ' [';\n  }\n`;\n\nexport const ArrayClosingLabel = styled.div`\n  font-size: 0.9em;\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  &::after {\n    content: ']';\n  }\n`;\n"
  },
  {
    "path": "src/common-elements/shelfs.tsx",
    "content": "import * as React from 'react';\nimport styled from '../styled-components';\n\nconst directionMap = {\n  left: '90deg',\n  right: '-90deg',\n  up: '-180deg',\n  down: '0',\n};\n\nconst IntShelfIcon = (props: {\n  className?: string;\n  float?: 'left' | 'right';\n  size?: string;\n  color?: string;\n  direction: 'left' | 'right' | 'up' | 'down';\n  style?: React.CSSProperties;\n}): JSX.Element => {\n  return (\n    <svg\n      className={props.className}\n      style={props.style}\n      version=\"1.1\"\n      viewBox=\"0 0 24 24\"\n      x=\"0\"\n      xmlns=\"http://www.w3.org/2000/svg\"\n      y=\"0\"\n      aria-hidden=\"true\"\n    >\n      <polygon points=\"17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 \" />\n    </svg>\n  );\n};\n\nexport const ShelfIcon = styled(IntShelfIcon)`\n  height: ${props => props.size || '18px'};\n  width: ${props => props.size || '18px'};\n  min-width: ${props => props.size || '18px'};\n  vertical-align: middle;\n  float: ${props => props.float || ''};\n  transition: transform 0.2s ease-out;\n  transform: rotateZ(${props => directionMap[props.direction || 'down']});\n\n  polygon {\n    fill: ${({ color, theme }) =>\n      (color && theme.colors.responses[color] && theme.colors.responses[color].color) || color};\n  }\n`;\n\nexport const Badge = styled.span<{ type: string; color?: string }>`\n  display: inline-block;\n  padding: 2px 8px;\n  margin: 0;\n  background-color: ${props => props.color || props.theme.colors[props.type].main};\n  color: ${props => props.theme.colors[props.type].contrastText};\n  font-size: ${props => props.theme.typography.code.fontSize};\n  vertical-align: middle;\n  line-height: 1.6;\n  border-radius: 4px;\n  font-weight: ${({ theme }) => theme.typography.fontWeightBold};\n  font-size: 12px;\n  + span[type] {\n    margin-left: 4px;\n  }\n`;\n"
  },
  {
    "path": "src/common-elements/tabs.ts",
    "content": "import { darken } from 'polished';\nimport { Tabs as ReactTabs } from 'react-tabs';\n\nimport styled from '../styled-components';\n\nexport { Tab, TabList, TabPanel } from 'react-tabs';\n\nexport const Tabs = styled(ReactTabs)`\n  > ul {\n    list-style: none;\n    padding: 0;\n    margin: 0;\n    margin: 0 -5px;\n\n    > li {\n      padding: 5px 10px;\n      display: inline-block;\n\n      background-color: ${({ theme }) => theme.codeBlock.backgroundColor};\n      border-bottom: 1px solid rgba(0, 0, 0, 0.5);\n      cursor: pointer;\n      text-align: center;\n      outline: none;\n      color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.rightPanel.textColor)};\n      margin: 0\n        ${({ theme }) => `${theme.spacing.unit}px ${theme.spacing.unit}px ${theme.spacing.unit}px`};\n      border: 1px solid ${({ theme }) => darken(0.05, theme.codeBlock.backgroundColor)};\n      border-radius: 5px;\n      min-width: 60px;\n      font-size: 0.9em;\n      font-weight: bold;\n\n      &.react-tabs__tab--selected {\n        color: ${props => props.theme.colors.text.primary};\n        background: ${({ theme }) => theme.rightPanel.textColor};\n        &:focus {\n          outline: auto;\n        }\n      }\n\n      &:only-child {\n        flex: none;\n        min-width: 100px;\n      }\n\n      &.tab-success {\n        color: ${props => props.theme.colors.responses.success.tabTextColor};\n      }\n\n      &.tab-redirect {\n        color: ${props => props.theme.colors.responses.redirect.tabTextColor};\n      }\n\n      &.tab-info {\n        color: ${props => props.theme.colors.responses.info.tabTextColor};\n      }\n\n      &.tab-error {\n        color: ${props => props.theme.colors.responses.error.tabTextColor};\n      }\n    }\n  }\n  > .react-tabs__tab-panel {\n    background: ${({ theme }) => theme.codeBlock.backgroundColor};\n    & > div,\n    & > pre {\n      padding: ${props => props.theme.spacing.unit * 4}px;\n      margin: 0;\n    }\n\n    & > div > pre {\n      padding: 0;\n    }\n  }\n`;\n\nexport const SmallTabs = styled(Tabs)`\n  > ul {\n    display: block;\n    > li {\n      padding: 2px 5px;\n      min-width: auto;\n      margin: 0 15px 0 0;\n      font-size: 13px;\n      font-weight: normal;\n      border-bottom: 1px dashed;\n      color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.rightPanel.textColor)};\n      border-radius: 0;\n      background: none;\n\n      &:last-child {\n        margin-right: 0;\n      }\n\n      &.react-tabs__tab--selected {\n        color: ${({ theme }) => theme.rightPanel.textColor};\n        background: none;\n      }\n    }\n  }\n  > .react-tabs__tab-panel {\n    & > div,\n    & > pre {\n      padding: ${props => props.theme.spacing.unit * 2}px 0;\n    }\n  }\n`;\n"
  },
  {
    "path": "src/components/ApiInfo/ApiInfo.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { AppStore } from '../../services/AppStore';\n\nimport { MiddlePanel, Row, Section } from '../../common-elements/';\nimport { ExternalDocumentation } from '../ExternalDocumentation/ExternalDocumentation';\nimport { Markdown } from '../Markdown/Markdown';\nimport { StyledMarkdownBlock } from '../Markdown/styled.elements';\nimport {\n  ApiHeader,\n  DownloadButton,\n  InfoSpan,\n  InfoSpanBox,\n  InfoSpanBoxWrap,\n} from './styled.elements';\nimport { l } from '../../services/Labels';\n\nexport interface ApiInfoProps {\n  store: AppStore;\n}\n\n@observer\nexport class ApiInfo extends React.Component<ApiInfoProps> {\n  render() {\n    const { store } = this.props;\n    const { info, externalDocs } = store.spec;\n    const hideDownloadButtons = store.options.hideDownloadButtons;\n\n    const downloadUrls = info.downloadUrls;\n    const downloadFileName = info.downloadFileName;\n    const license =\n      (info.license && (\n        <InfoSpan>\n          License:{' '}\n          {info.license.identifier ? (\n            info.license.identifier\n          ) : (\n            <a href={info.license.url}>{info.license.name}</a>\n          )}\n        </InfoSpan>\n      )) ||\n      null;\n\n    const website =\n      (info.contact && info.contact.url && (\n        <InfoSpan>\n          URL: <a href={info.contact.url}>{info.contact.url}</a>\n        </InfoSpan>\n      )) ||\n      null;\n\n    const email =\n      (info.contact && info.contact.email && (\n        <InfoSpan>\n          {info.contact.name || 'E-mail'}:{' '}\n          <a href={'mailto:' + info.contact.email}>{info.contact.email}</a>\n        </InfoSpan>\n      )) ||\n      null;\n\n    const terms =\n      (info.termsOfService && (\n        <InfoSpan>\n          <a href={info.termsOfService}>Terms of Service</a>\n        </InfoSpan>\n      )) ||\n      null;\n\n    const version = (info.version && <span>({info.version})</span>) || null;\n\n    return (\n      <Section>\n        <Row>\n          <MiddlePanel className=\"api-info\">\n            <ApiHeader>\n              {info.title} {version}\n            </ApiHeader>\n            {!hideDownloadButtons && (\n              <p>\n                {l('downloadSpecification')}:\n                {downloadUrls?.map(({ title, url }) => {\n                  return (\n                    <DownloadButton\n                      download={downloadFileName || true}\n                      target=\"_blank\"\n                      href={url}\n                      rel=\"noreferrer\"\n                      key={url}\n                    >\n                      {title}\n                    </DownloadButton>\n                  );\n                })}\n              </p>\n            )}\n            <StyledMarkdownBlock>\n              {((info.license || info.contact || info.termsOfService) && (\n                <InfoSpanBoxWrap>\n                  <InfoSpanBox>\n                    {email} {website} {license} {terms}\n                  </InfoSpanBox>\n                </InfoSpanBoxWrap>\n              )) ||\n                null}\n            </StyledMarkdownBlock>\n            <Markdown source={store.spec.info.summary} data-role=\"redoc-summary\" />\n            <Markdown source={store.spec.info.description} data-role=\"redoc-description\" />\n            {externalDocs && <ExternalDocumentation externalDocs={externalDocs} />}\n          </MiddlePanel>\n        </Row>\n      </Section>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/ApiInfo/index.ts",
    "content": "export { ApiInfo } from './ApiInfo';\n"
  },
  {
    "path": "src/components/ApiInfo/styled.elements.ts",
    "content": "import { H1, MiddlePanel } from '../../common-elements';\nimport styled, { extensionsHook } from '../../styled-components';\n\nconst delimiterWidth = 15;\n\nexport const ApiInfoWrap = MiddlePanel;\n\nexport const ApiHeader = styled(H1)`\n  margin-top: 0;\n  margin-bottom: 0.5em;\n\n  ${extensionsHook('ApiHeader')};\n`;\n\nexport const DownloadButton = styled.a`\n  border: 1px solid ${props => props.theme.colors.primary.main};\n  color: ${props => props.theme.colors.primary.main};\n  font-weight: normal;\n  margin-left: 0.5em;\n  padding: 4px 8px 4px;\n  display: inline-block;\n  text-decoration: none;\n  cursor: pointer;\n\n  ${extensionsHook('DownloadButton')};\n`;\n\nexport const InfoSpan = styled.span`\n  &::before {\n    content: '|';\n    display: inline-block;\n    opacity: 0.5;\n    width: ${delimiterWidth}px;\n    text-align: center;\n  }\n\n  &:last-child::after {\n    display: none;\n  }\n`;\n\nexport const InfoSpanBoxWrap = styled.div`\n  overflow: hidden;\n`;\n\nexport const InfoSpanBox = styled.div`\n  display: flex;\n  flex-wrap: wrap;\n  // hide separator on new lines: idea from https://stackoverflow.com/a/31732902/1749888\n  margin-left: -${delimiterWidth}px;\n`;\n"
  },
  {
    "path": "src/components/ApiLogo/ApiLogo.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { OpenAPIInfo } from '../../types';\nimport { LinkWrap, LogoImgEl, LogoWrap } from './styled.elements';\n\n@observer\nexport class ApiLogo extends React.Component<{ info: OpenAPIInfo }> {\n  render() {\n    const { info } = this.props;\n    const logoInfo = info['x-logo'];\n    if (!logoInfo || !logoInfo.url) {\n      return null;\n    }\n\n    const logoHref = logoInfo.href || (info.contact && info.contact.url);\n\n    // Use the english word logo if no alt text is provided\n    const altText = logoInfo.altText ? logoInfo.altText : 'logo';\n\n    const logo = <LogoImgEl src={logoInfo.url} alt={altText} />;\n    return (\n      <LogoWrap style={{ backgroundColor: logoInfo.backgroundColor }}>\n        {logoHref ? LinkWrap(logoHref)(logo) : logo}\n      </LogoWrap>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/ApiLogo/styled.elements.tsx",
    "content": "import * as React from 'react';\nimport styled from '../../styled-components';\n\nexport const LogoImgEl = styled.img`\n  max-height: ${props => props.theme.logo.maxHeight};\n  max-width: ${props => props.theme.logo.maxWidth};\n  padding: ${props => props.theme.logo.gutter};\n  width: 100%;\n  display: block;\n`;\n\nexport const LogoWrap = styled.div`\n  text-align: center;\n`;\n\nconst Link = styled.a`\n  display: inline-block;\n`;\n\n// eslint-disable-next-line react/display-name\nexport const LinkWrap = url => Component => <Link href={url}>{Component}</Link>;\n"
  },
  {
    "path": "src/components/CallbackSamples/CallbackReqSamples.tsx",
    "content": "import * as React from 'react';\n\nimport styled from '../../styled-components';\nimport { DropdownProps } from '../../common-elements';\nimport { PayloadSamples } from '../PayloadSamples/PayloadSamples';\nimport { OperationModel } from '../../services/models';\nimport { XPayloadSample } from '../../services/models/Operation';\nimport { isPayloadSample } from '../../services';\n\nexport interface PayloadSampleProps {\n  callback: OperationModel;\n  renderDropdown: (props: DropdownProps) => JSX.Element;\n}\n\nexport class CallbackPayloadSample extends React.Component<PayloadSampleProps> {\n  render() {\n    const payloadSample = this.props.callback.codeSamples.find(sample =>\n      isPayloadSample(sample),\n    ) as XPayloadSample | undefined;\n\n    if (!payloadSample) {\n      return null;\n    }\n\n    return (\n      <PayloadSampleWrapper>\n        <PayloadSamples content={payloadSample.requestBodyContent} />\n      </PayloadSampleWrapper>\n    );\n  }\n}\n\nexport const PayloadSampleWrapper = styled.div`\n  margin-top: 15px;\n`;\n"
  },
  {
    "path": "src/components/CallbackSamples/CallbackSamples.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport styled from '../../styled-components';\nimport { RightPanelHeader } from '../../common-elements';\nimport { RedocNormalizedOptions } from '../../services';\nimport { CallbackModel } from '../../services/models';\nimport { OptionsContext } from '../OptionsProvider';\nimport { GenericChildrenSwitcher } from '../GenericChildrenSwitcher/GenericChildrenSwitcher';\nimport { DropdownOrLabel } from '../DropdownOrLabel/DropdownOrLabel';\nimport { InvertedSimpleDropdown, MimeLabel } from '../PayloadSamples/styled.elements';\nimport { CallbackPayloadSample } from './CallbackReqSamples';\n\nexport interface CallbackSamplesProps {\n  callbacks: CallbackModel[];\n}\n\n@observer\nexport class CallbackSamples extends React.Component<CallbackSamplesProps> {\n  static contextType = OptionsContext;\n  context: RedocNormalizedOptions;\n\n  private renderDropdown = props => {\n    return (\n      <DropdownOrLabel\n        Label={MimeLabel}\n        Dropdown={InvertedSimpleDropdown}\n        {...props}\n        variant=\"dark\"\n      />\n    );\n  };\n\n  render() {\n    const { callbacks } = this.props;\n\n    if (!callbacks || callbacks.length === 0) {\n      return null;\n    }\n\n    const operations = callbacks\n      .map(callback => callback.operations.map(operation => operation))\n      .reduce((a, b) => a.concat(b), []);\n\n    const hasSamples = operations.some(operation => operation.codeSamples.length > 0);\n\n    if (!hasSamples) {\n      return null;\n    }\n\n    const dropdownOptions = operations.map((callback, idx) => {\n      return {\n        value: `${callback.httpVerb.toUpperCase()}: ${callback.name}`,\n        idx,\n      };\n    });\n\n    return (\n      <div>\n        <RightPanelHeader> Callback payload samples </RightPanelHeader>\n\n        <SamplesWrapper>\n          <GenericChildrenSwitcher\n            items={operations}\n            renderDropdown={this.renderDropdown}\n            label={'Callback'}\n            options={dropdownOptions}\n          >\n            {callback => (\n              <CallbackPayloadSample\n                key=\"callbackPayloadSample\"\n                callback={callback}\n                renderDropdown={this.renderDropdown}\n              />\n            )}\n          </GenericChildrenSwitcher>\n        </SamplesWrapper>\n      </div>\n    );\n  }\n}\n\nexport const SamplesWrapper = styled.div`\n  background: ${({ theme }) => theme.codeBlock.backgroundColor};\n  padding: ${props => props.theme.spacing.unit * 4}px;\n`;\n"
  },
  {
    "path": "src/components/Callbacks/CallbackDetails.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { OperationModel } from '../../services/models';\nimport styled from '../../styled-components';\nimport { Endpoint } from '../Endpoint/Endpoint';\nimport { ExternalDocumentation } from '../ExternalDocumentation/ExternalDocumentation';\nimport { Extensions } from '../Fields/Extensions';\nimport { Markdown } from '../Markdown/Markdown';\nimport { Parameters } from '../Parameters/Parameters';\nimport { ResponsesList } from '../Responses/ResponsesList';\nimport { SecurityRequirements } from '../SecurityRequirement/SecurityRequirement';\nimport { CallbackDetailsWrap } from './styled.elements';\n\nexport interface CallbackDetailsProps {\n  operation: OperationModel;\n}\n\n@observer\nexport class CallbackDetails extends React.Component<CallbackDetailsProps> {\n  render() {\n    const { operation } = this.props;\n    const { description, externalDocs } = operation;\n    const hasDescription = !!(description || externalDocs);\n\n    return (\n      <CallbackDetailsWrap>\n        {hasDescription && (\n          <Description>\n            {description !== undefined && <Markdown source={description} />}\n            {externalDocs && <ExternalDocumentation externalDocs={externalDocs} />}\n          </Description>\n        )}\n        <Endpoint operation={this.props.operation} inverted={true} compact={true} />\n        <Extensions extensions={operation.extensions} />\n        <SecurityRequirements securities={operation.security} />\n        <Parameters parameters={operation.parameters} body={operation.requestBody} />\n        <ResponsesList responses={operation.responses} isCallback={operation.isCallback} />\n      </CallbackDetailsWrap>\n    );\n  }\n}\n\nconst Description = styled.div`\n  margin-bottom: ${({ theme }) => theme.spacing.unit * 3}px;\n`;\n"
  },
  {
    "path": "src/components/Callbacks/CallbackOperation.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { OperationModel } from '../../services/models';\nimport { StyledCallbackTitle } from './styled.elements';\nimport { CallbackDetails } from './CallbackDetails';\n\n@observer\nexport class CallbackOperation extends React.Component<{ callbackOperation: OperationModel }> {\n  toggle = () => {\n    this.props.callbackOperation.toggle();\n  };\n\n  render() {\n    const { name, expanded, httpVerb, deprecated } = this.props.callbackOperation;\n\n    return (\n      <>\n        <StyledCallbackTitle\n          onClick={this.toggle}\n          name={name}\n          opened={expanded}\n          httpVerb={httpVerb}\n          deprecated={deprecated}\n        />\n        {expanded && <CallbackDetails operation={this.props.callbackOperation} />}\n      </>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Callbacks/CallbackTitle.tsx",
    "content": "import * as React from 'react';\n\nimport { darken } from 'polished';\nimport { ShelfIcon } from '../../common-elements';\nimport { OperationBadge } from '../SideMenu/styled.elements';\nimport { shortenHTTPVerb } from '../../utils/openapi';\nimport styled from '../../styled-components';\nimport { Badge } from '../../common-elements/';\nimport { l } from '../../services/Labels';\n\nexport interface CallbackTitleProps {\n  name: string;\n  opened?: boolean;\n  httpVerb: string;\n  deprecated?: boolean;\n  className?: string;\n  onClick?: () => void;\n}\n\nexport const CallbackTitle = (props: CallbackTitleProps) => {\n  const { name, opened, className, onClick, httpVerb, deprecated } = props;\n\n  return (\n    <CallbackTitleWrapper className={className} onClick={onClick || undefined}>\n      <OperationBadgeStyled type={httpVerb}>{shortenHTTPVerb(httpVerb)}</OperationBadgeStyled>\n      <ShelfIcon size={'1.5em'} direction={opened ? 'down' : 'right'} float={'left'} />\n      <CallbackName $deprecated={deprecated}>{name}</CallbackName>\n      {deprecated ? <Badge type=\"warning\"> {l('deprecated')} </Badge> : null}\n    </CallbackTitleWrapper>\n  );\n};\n\nconst CallbackTitleWrapper = styled.button`\n  border: 0;\n  width: 100%;\n  text-align: left;\n  & > * {\n    vertical-align: middle;\n  }\n\n  ${ShelfIcon} {\n    polygon {\n      fill: ${({ theme }) => darken(theme.colors.tonalOffset, theme.colors.gray[100])};\n    }\n  }\n`;\n\nconst CallbackName = styled.span<{ $deprecated?: boolean }>`\n  text-decoration: ${props => (props.$deprecated ? 'line-through' : 'none')};\n  margin-right: 8px;\n`;\n\nconst OperationBadgeStyled = styled(OperationBadge)`\n  margin: 0 5px 0 0;\n`;\n"
  },
  {
    "path": "src/components/Callbacks/CallbacksList.tsx",
    "content": "import * as React from 'react';\n\nimport { CallbackModel } from '../../services/models';\nimport styled from '../../styled-components';\nimport { CallbackOperation } from './CallbackOperation';\n\nexport interface CallbacksListProps {\n  callbacks: CallbackModel[];\n}\n\nexport class CallbacksList extends React.PureComponent<CallbacksListProps> {\n  render() {\n    const { callbacks } = this.props;\n\n    if (!callbacks || callbacks.length === 0) {\n      return null;\n    }\n\n    return (\n      <div>\n        <CallbacksHeader> Callbacks </CallbacksHeader>\n        {callbacks.map(callback => {\n          return callback.operations.map((operation, index) => {\n            return (\n              <CallbackOperation key={`${callback.name}_${index}`} callbackOperation={operation} />\n            );\n          });\n        })}\n      </div>\n    );\n  }\n}\n\nconst CallbacksHeader = styled.h3`\n  font-size: 1.3em;\n  padding: 0.2em 0;\n  margin: 3em 0 1.1em;\n  color: ${({ theme }) => theme.colors.text.primary};\n  font-weight: normal;\n`;\n"
  },
  {
    "path": "src/components/Callbacks/index.ts",
    "content": "export * from './CallbackOperation';\nexport * from './CallbackTitle';\nexport * from './CallbacksList';\n"
  },
  {
    "path": "src/components/Callbacks/styled.elements.ts",
    "content": "import styled from '../../styled-components';\nimport { CallbackTitle } from './CallbackTitle';\nimport { darken } from 'polished';\n\nexport const StyledCallbackTitle = styled(CallbackTitle)`\n  padding: 10px;\n  border-radius: 2px;\n  margin-bottom: 4px;\n  line-height: 1.5em;\n  background-color: ${({ theme }) => theme.colors.gray[100]};\n  cursor: pointer;\n  outline-color: ${({ theme }) => darken(theme.colors.tonalOffset, theme.colors.gray[100])};\n`;\n\nexport const CallbackDetailsWrap = styled.div`\n  padding: 10px 25px;\n  background-color: ${({ theme }) => theme.colors.gray[50]};\n  margin-bottom: 5px;\n  margin-top: 5px;\n`;\n"
  },
  {
    "path": "src/components/ContentItems/ContentItems.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ExternalDocumentation } from '../ExternalDocumentation/ExternalDocumentation';\nimport { AdvancedMarkdown } from '../Markdown/AdvancedMarkdown';\nimport { H2, H3, MiddlePanel, Row, Section, ShareLink } from '../../common-elements';\nimport type { ContentItemModel } from '../../services';\nimport type { GroupModel, OperationModel } from '../../services/models';\nimport { Operation } from '../Operation/Operation';\n\n@observer\nexport class ContentItems extends React.Component<{\n  items: ContentItemModel[];\n}> {\n  render() {\n    const items = this.props.items;\n    if (items.length === 0) {\n      return null;\n    }\n    return items.map(item => {\n      return <ContentItem key={item.id} item={item} />;\n    });\n  }\n}\n\nexport interface ContentItemProps {\n  item: ContentItemModel;\n}\n\n@observer\nexport class ContentItem extends React.Component<ContentItemProps> {\n  render() {\n    const item = this.props.item;\n    let content;\n    const { type } = item;\n    switch (type) {\n      case 'group':\n        content = null;\n        break;\n      case 'tag':\n      case 'section':\n        content = <SectionItem {...this.props} />;\n        break;\n      case 'operation':\n        content = <OperationItem item={item as any} />;\n        break;\n      default:\n        content = <SectionItem {...this.props} />;\n    }\n\n    return (\n      <>\n        {content && (\n          <Section id={item.id} $underlined={item.type === 'operation'}>\n            {content}\n          </Section>\n        )}\n        {item.items && <ContentItems items={item.items} />}\n      </>\n    );\n  }\n}\n\nconst middlePanelWrap = component => <MiddlePanel $compact={true}>{component}</MiddlePanel>;\n\n@observer\nexport class SectionItem extends React.Component<ContentItemProps> {\n  render() {\n    const { name, description, externalDocs, level } = this.props.item as GroupModel;\n\n    const Header = level === 2 ? H3 : H2;\n    return (\n      <>\n        <Row>\n          <MiddlePanel $compact={false}>\n            <Header>\n              <ShareLink to={this.props.item.id} />\n              {name}\n            </Header>\n          </MiddlePanel>\n        </Row>\n        <AdvancedMarkdown\n          parentId={this.props.item.id}\n          source={description || ''}\n          htmlWrap={middlePanelWrap}\n        />\n        {externalDocs && (\n          <Row>\n            <MiddlePanel>\n              <ExternalDocumentation externalDocs={externalDocs} />\n            </MiddlePanel>\n          </Row>\n        )}\n      </>\n    );\n  }\n}\n\n@observer\nexport class OperationItem extends React.Component<{\n  item: OperationModel;\n}> {\n  render() {\n    return <Operation operation={this.props.item} />;\n  }\n}\n"
  },
  {
    "path": "src/components/DropdownOrLabel/DropdownOrLabel.tsx",
    "content": "import * as React from 'react';\nimport { StyledComponent } from 'styled-components';\n\nimport { DropdownProps, MimeLabel, SimpleDropdown } from '../../common-elements/Dropdown';\n\nexport interface DropdownOrLabelProps extends DropdownProps {\n  Label?: StyledComponent<any, any, Record<string, any>, never>;\n  Dropdown?: StyledComponent<\n    React.NamedExoticComponent<DropdownProps>,\n    any,\n    {\n      fullWidth?: boolean | undefined;\n    },\n    never\n  >;\n}\n\nexport function DropdownOrLabel(props: DropdownOrLabelProps): JSX.Element {\n  const { Label = MimeLabel, Dropdown = SimpleDropdown } = props;\n  if (props.options.length === 1) {\n    return <Label>{props.options[0].value}</Label>;\n  }\n  return <Dropdown {...props} />;\n}\n"
  },
  {
    "path": "src/components/Endpoint/Endpoint.tsx",
    "content": "import * as React from 'react';\nimport { ShelfIcon } from '../../common-elements';\nimport { OperationModel } from '../../services';\nimport { Markdown } from '../Markdown/Markdown';\nimport { OptionsContext } from '../OptionsProvider';\nimport { SelectOnClick } from '../SelectOnClick/SelectOnClick';\n\nimport { expandDefaultServerVariables, getBasePath } from '../../utils';\nimport {\n  EndpointInfo,\n  HttpVerb,\n  OperationEndpointWrap,\n  ServerItem,\n  ServerRelativeURL,\n  ServersOverlay,\n  ServerUrl,\n} from './styled.elements';\n\nexport interface EndpointProps {\n  operation: OperationModel;\n\n  hideHostname?: boolean;\n  inverted?: boolean;\n  compact?: boolean;\n}\n\nexport interface EndpointState {\n  expanded: boolean;\n}\n\nexport class Endpoint extends React.Component<EndpointProps, EndpointState> {\n  constructor(props) {\n    super(props);\n    this.state = {\n      expanded: false,\n    };\n  }\n\n  toggle = () => {\n    this.setState({ expanded: !this.state.expanded });\n  };\n\n  render() {\n    const { operation, inverted, hideHostname } = this.props;\n    const { expanded } = this.state;\n\n    // TODO: highlight server variables, e.g. https://{user}.test.com\n    return (\n      <OptionsContext.Consumer>\n        {options => (\n          <OperationEndpointWrap>\n            <EndpointInfo onClick={this.toggle} $expanded={expanded} $inverted={inverted}>\n              <HttpVerb type={operation.httpVerb} $compact={this.props.compact}>\n                {operation.httpVerb}\n              </HttpVerb>\n              <ServerRelativeURL>{operation.path}</ServerRelativeURL>\n              <ShelfIcon\n                float={'right'}\n                color={inverted ? 'black' : 'white'}\n                size={'20px'}\n                direction={expanded ? 'up' : 'down'}\n                style={{ marginRight: '-25px' }}\n              />\n            </EndpointInfo>\n            <ServersOverlay $expanded={expanded} aria-hidden={!expanded}>\n              {operation.servers.map(server => {\n                const normalizedUrl = options.expandDefaultServerVariables\n                  ? expandDefaultServerVariables(server.url, server.variables)\n                  : server.url;\n                const basePath = getBasePath(normalizedUrl);\n                return (\n                  <ServerItem key={normalizedUrl}>\n                    <Markdown source={server.description || ''} compact={true} />\n                    <SelectOnClick>\n                      <ServerUrl>\n                        <span>\n                          {hideHostname || options.hideHostname\n                            ? basePath === '/'\n                              ? ''\n                              : basePath\n                            : normalizedUrl}\n                        </span>\n                        {operation.path}\n                      </ServerUrl>\n                    </SelectOnClick>\n                  </ServerItem>\n                );\n              })}\n            </ServersOverlay>\n          </OperationEndpointWrap>\n        )}\n      </OptionsContext.Consumer>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Endpoint/styled.elements.ts",
    "content": "import styled from '../../styled-components';\n\nexport const OperationEndpointWrap = styled.div`\n  cursor: pointer;\n  position: relative;\n  margin-bottom: 5px;\n`;\n\nexport const ServerRelativeURL = styled.span`\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  margin-left: 10px;\n  flex: 1;\n  overflow-x: hidden;\n  text-overflow: ellipsis;\n`;\n\nexport const EndpointInfo = styled.button<{ $expanded?: boolean; $inverted?: boolean }>`\n  outline: 0;\n  color: inherit;\n  width: 100%;\n  text-align: left;\n  cursor: pointer;\n  padding: 10px 30px 10px ${props => (props.$inverted ? '10px' : '20px')};\n  border-radius: ${props => (props.$inverted ? '0' : '4px 4px 0 0')};\n  background-color: ${props =>\n    props.$inverted ? 'transparent' : props.theme.codeBlock.backgroundColor};\n  display: flex;\n  white-space: nowrap;\n  align-items: center;\n  border: ${props => (props.$inverted ? '0' : '1px solid transparent')};\n  border-bottom: ${props => (props.$inverted ? '1px solid #ccc' : '0')};\n  transition: border-color 0.25s ease;\n\n  ${props =>\n    (props.$expanded && !props.$inverted && `border-color: ${props.theme.colors.border.dark};`) ||\n    ''}\n\n  .${ServerRelativeURL} {\n    color: ${props => (props.$inverted ? props.theme.colors.text.primary : '#ffffff')};\n  }\n  &:focus {\n    box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(128, 128, 128, 0.25);\n  }\n`;\n\nexport const HttpVerb = styled.span.attrs((props: { type: string; $compact?: boolean }) => ({\n  className: `http-verb ${props.type}`,\n}))<{ type: string; $compact?: boolean }>`\n  font-size: ${props => (props.$compact ? '0.8em' : '0.929em')};\n  line-height: ${props => (props.$compact ? '18px' : '20px')};\n  background-color: ${props => props.theme.colors.http[props.type] || '#999999'};\n  color: #ffffff;\n  padding: ${props => (props.$compact ? '2px 8px' : '3px 10px')};\n  text-transform: uppercase;\n  font-family: ${props => props.theme.typography.headings.fontFamily};\n  margin: 0;\n`;\n\nexport const ServersOverlay = styled.div<{ $expanded: boolean }>`\n  position: absolute;\n  width: 100%;\n  z-index: 100;\n  background: ${props => props.theme.rightPanel.servers.overlay.backgroundColor};\n  color: ${props => props.theme.rightPanel.servers.overlay.textColor};\n  box-sizing: border-box;\n  box-shadow: 0 0 6px rgba(0, 0, 0, 0.33);\n  overflow: hidden;\n  border-bottom-left-radius: 4px;\n  border-bottom-right-radius: 4px;\n  transition: all 0.25s ease;\n  visibility: hidden;\n  ${props => (props.$expanded ? 'visibility: visible;' : 'transform: translateY(-50%) scaleY(0);')}\n`;\n\nexport const ServerItem = styled.div`\n  padding: 10px;\n`;\n\nexport const ServerUrl = styled.div`\n  padding: 5px;\n  border: 1px solid #ccc;\n  background: ${props => props.theme.rightPanel.servers.url.backgroundColor};\n  word-break: break-all;\n  color: ${props => props.theme.colors.primary.main};\n  > span {\n    color: ${props => props.theme.colors.text.primary};\n  }\n`;\n"
  },
  {
    "path": "src/components/ErrorBoundary.tsx",
    "content": "import * as React from 'react';\nimport styled from '../styled-components';\n\nconst ErrorWrapper = styled.div`\n  padding: 20px;\n  color: red;\n`;\n\nexport class ErrorBoundary extends React.Component<\n  React.PropsWithChildren<unknown>,\n  { error?: Error }\n> {\n  constructor(props) {\n    super(props);\n    this.state = { error: undefined };\n  }\n\n  componentDidCatch(error) {\n    this.setState({ error });\n    return false;\n  }\n\n  render() {\n    if (this.state.error) {\n      return (\n        <ErrorWrapper>\n          <h1>Something went wrong...</h1>\n          <small> {this.state.error.message} </small>\n          <p>\n            <details>\n              <summary>Stack trace</summary>\n              <pre>{this.state.error.stack}</pre>\n            </details>\n          </p>\n          <small> ReDoc Version: {__REDOC_VERSION__}</small> <br />\n          <small> Commit: {__REDOC_REVISION__}</small>\n        </ErrorWrapper>\n      );\n    }\n    return <React.Fragment>{React.Children.only(this.props.children)}</React.Fragment>;\n  }\n}\n"
  },
  {
    "path": "src/components/ExternalDocumentation/ExternalDocumentation.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\nimport styled from '../../styled-components';\nimport { OpenAPIExternalDocumentation } from '../../types';\nimport { linksCss } from '../Markdown/styled.elements';\n\nconst LinkWrap = styled.div<{ $compact?: boolean }>`\n  ${linksCss};\n  ${({ $compact }) => (!$compact ? 'margin: 1em 0' : '')}\n`;\n\n@observer\nexport class ExternalDocumentation extends React.Component<{\n  externalDocs: OpenAPIExternalDocumentation;\n  compact?: boolean;\n}> {\n  render() {\n    const { externalDocs } = this.props;\n    if (!externalDocs || !externalDocs.url) {\n      return null;\n    }\n\n    return (\n      <LinkWrap $compact={this.props.compact}>\n        <a href={externalDocs.url}>{externalDocs.description || externalDocs.url}</a>\n      </LinkWrap>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Fields/ArrayItemDetails.tsx",
    "content": "import * as React from 'react';\nimport { TypeFormat, TypePrefix } from '../../common-elements/fields';\nimport { ConstraintsView } from './FieldConstraints';\nimport { Pattern } from './Pattern';\nimport { SchemaModel } from '../../services';\nimport styled from '../../styled-components';\nimport { OptionsContext } from '../OptionsProvider';\n\nexport function ArrayItemDetails({ schema }: { schema: SchemaModel }) {\n  const { hideSchemaPattern } = React.useContext(OptionsContext);\n  if (\n    !schema ||\n    ((!schema?.pattern || hideSchemaPattern) &&\n      !schema.items &&\n      !schema.displayFormat &&\n      !schema.constraints?.length) // return null for cases where all constraints are empty\n  ) {\n    return null;\n  }\n\n  return (\n    <Wrapper>\n      [ items\n      {schema.displayFormat && <TypeFormat> &lt;{schema.displayFormat} &gt;</TypeFormat>}\n      <ConstraintsView constraints={schema.constraints} />\n      <Pattern schema={schema} />\n      {schema.items && <ArrayItemDetails schema={schema.items} />} ]\n    </Wrapper>\n  );\n}\n\nconst Wrapper = styled(TypePrefix)`\n  margin: 0 5px;\n  vertical-align: text-top;\n`;\n"
  },
  {
    "path": "src/components/Fields/EnumValues.tsx",
    "content": "import * as React from 'react';\nimport { ExampleValue, FieldLabel } from '../../common-elements/fields';\n\nimport { l } from '../../services/Labels';\nimport { OptionsContext } from '../OptionsProvider';\nimport styled from '../../styled-components';\nimport { RedocRawOptions } from '../../services/RedocNormalizedOptions';\nimport { StyledMarkdownBlock } from '../Markdown/styled.elements';\nimport { Markdown } from '../Markdown/Markdown';\n\nexport interface EnumValuesProps {\n  values?: string[] | { [name: string]: string };\n  type: string | string[];\n}\n\nexport interface EnumValuesState {\n  collapsed: boolean;\n}\n\nconst DescriptionEnumsBlock = styled(StyledMarkdownBlock)`\n  table {\n    margin-bottom: 0.2em;\n  }\n`;\n\nexport class EnumValues extends React.PureComponent<EnumValuesProps, EnumValuesState> {\n  constructor(props: EnumValuesProps) {\n    super(props);\n    this.toggle = this.toggle.bind(this);\n  }\n  state: EnumValuesState = {\n    collapsed: true,\n  };\n\n  static contextType = OptionsContext;\n\n  private toggle() {\n    this.setState({ collapsed: !this.state.collapsed });\n  }\n\n  render() {\n    const { values, type } = this.props;\n    const { collapsed } = this.state;\n    const isDescriptionEnum = !Array.isArray(values);\n    const enums =\n      (Array.isArray(values) && values) ||\n      Object.entries(values || {}).map(([value, description]) => ({\n        value,\n        description,\n      }));\n\n    // TODO: provide context interface in more elegant way\n    const { enumSkipQuotes, maxDisplayedEnumValues } = this.context as RedocRawOptions;\n\n    if (!enums.length) {\n      return null;\n    }\n\n    const displayedItems =\n      this.state.collapsed && maxDisplayedEnumValues\n        ? enums.slice(0, maxDisplayedEnumValues)\n        : enums;\n\n    const showToggleButton = maxDisplayedEnumValues ? enums.length > maxDisplayedEnumValues : false;\n\n    const toggleButtonText = maxDisplayedEnumValues\n      ? collapsed\n        ? `… ${enums.length - maxDisplayedEnumValues} more`\n        : 'Hide'\n      : '';\n\n    return (\n      <div>\n        {isDescriptionEnum ? (\n          <>\n            <DescriptionEnumsBlock>\n              <table>\n                <thead>\n                  <tr>\n                    <th>\n                      <FieldLabel>\n                        {type === 'array' ? l('enumArray') : ''}{' '}\n                        {enums.length === 1 ? l('enumSingleValue') : l('enum')}\n                      </FieldLabel>{' '}\n                    </th>\n                    <th>\n                      <strong>Description</strong>\n                    </th>\n                  </tr>\n                </thead>\n                <tbody>\n                  {(displayedItems as { value: string; description: string }[]).map(\n                    ({ description, value }) => {\n                      return (\n                        <tr key={value}>\n                          <td>{value}</td>\n                          <td>\n                            <Markdown source={description} compact inline />\n                          </td>\n                        </tr>\n                      );\n                    },\n                  )}\n                </tbody>\n              </table>\n            </DescriptionEnumsBlock>\n            {showToggleButton ? (\n              <ToggleButton onClick={this.toggle}>{toggleButtonText}</ToggleButton>\n            ) : null}\n          </>\n        ) : (\n          <>\n            <FieldLabel>\n              {type === 'array' ? l('enumArray') : ''}{' '}\n              {values.length === 1 ? l('enumSingleValue') : l('enum')}:\n            </FieldLabel>{' '}\n            {displayedItems.map((value, idx) => {\n              const exampleValue = enumSkipQuotes ? String(value) : JSON.stringify(value);\n              return (\n                <React.Fragment key={idx}>\n                  <ExampleValue>{exampleValue}</ExampleValue>{' '}\n                </React.Fragment>\n              );\n            })}\n            {showToggleButton ? (\n              <ToggleButton onClick={this.toggle}>{toggleButtonText}</ToggleButton>\n            ) : null}\n          </>\n        )}\n      </div>\n    );\n  }\n}\n\nconst ToggleButton = styled.span`\n  color: ${props => props.theme.colors.primary.main};\n  vertical-align: middle;\n  font-size: 13px;\n  line-height: 20px;\n  padding: 0 5px;\n  cursor: pointer;\n`;\n"
  },
  {
    "path": "src/components/Fields/Examples.tsx",
    "content": "import * as React from 'react';\n\nimport { FieldLabel, ExampleValue } from '../../common-elements/fields';\nimport { getSerializedValue, isArray } from '../../utils';\n\nimport { l } from '../../services/Labels';\nimport { FieldModel } from '../../services';\nimport styled from '../../styled-components';\n\nexport function Examples({ field }: { field: FieldModel }) {\n  if (!field.examples) {\n    return null;\n  }\n\n  return (\n    <>\n      <FieldLabel> {l('examples')}: </FieldLabel>\n      {isArray(field.examples) ? (\n        field.examples.map((example, idx) => {\n          const value = getSerializedValue(field, example);\n          const stringifyValue = field.in ? String(value) : JSON.stringify(value);\n          return (\n            <React.Fragment key={idx}>\n              <ExampleValue>{stringifyValue}</ExampleValue>{' '}\n            </React.Fragment>\n          );\n        })\n      ) : (\n        <ExamplesList>\n          {Object.values(field.examples).map((example, idx) => (\n            <li key={idx + example.value}>\n              <ExampleValue>{getSerializedValue(field, example.value)}</ExampleValue> -{' '}\n              {example.summary || example.description}\n            </li>\n          ))}\n        </ExamplesList>\n      )}\n    </>\n  );\n}\n\nconst ExamplesList = styled.ul`\n  margin-top: 1em;\n  list-style-position: outside;\n`;\n"
  },
  {
    "path": "src/components/Fields/Extensions.tsx",
    "content": "import * as React from 'react';\n\nimport { ExtensionValue, FieldLabel } from '../../common-elements/fields';\n\nimport styled from '../../styled-components';\n\nimport { OptionsContext } from '../OptionsProvider';\n\nimport { StyledMarkdownBlock } from '../Markdown/styled.elements';\n\nconst Extension = styled(StyledMarkdownBlock)`\n  margin: 2px 0;\n`;\n\nexport interface ExtensionsProps {\n  extensions: {\n    [k: string]: any;\n  };\n}\n\nexport class Extensions extends React.PureComponent<ExtensionsProps> {\n  render() {\n    const exts = this.props.extensions;\n    return (\n      <OptionsContext.Consumer>\n        {options => (\n          <>\n            {options.showExtensions &&\n              Object.keys(exts).map(key => (\n                <Extension key={key}>\n                  <FieldLabel> {key.substring(2)}: </FieldLabel>{' '}\n                  <ExtensionValue>\n                    {typeof exts[key] === 'string' ? exts[key] : JSON.stringify(exts[key])}\n                  </ExtensionValue>\n                </Extension>\n              ))}\n          </>\n        )}\n      </OptionsContext.Consumer>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Fields/Field.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n  ClickablePropertyNameCell,\n  PropertyLabel,\n  RequiredLabel,\n} from '../../common-elements/fields';\nimport { FieldDetails } from './FieldDetails';\nimport {\n  InnerPropertiesWrap,\n  PropertyBullet,\n  PropertyCellWithInner,\n  PropertyDetailsCell,\n  PropertyNameCell,\n} from '../../common-elements/fields-layout';\nimport { ShelfIcon } from '../../common-elements/';\nimport { Schema } from '../Schema/Schema';\n\nimport type { SchemaOptions } from '../Schema/Schema';\nimport type { FieldModel } from '../../services/models';\nimport { OptionsContext } from '../OptionsProvider';\nimport { RedocNormalizedOptions } from '../../services/RedocNormalizedOptions';\n\nexport interface FieldProps extends SchemaOptions {\n  className?: string;\n  isLast?: boolean;\n  showExamples?: boolean;\n\n  field: FieldModel;\n  expandByDefault?: boolean;\n  fieldParentsName?: string[];\n  renderDiscriminatorSwitch?: (opts: FieldProps) => JSX.Element;\n}\n\n@observer\nexport class Field extends React.Component<FieldProps> {\n  static contextType = OptionsContext;\n  context: RedocNormalizedOptions;\n\n  toggle = () => {\n    if (this.props.field.expanded === undefined && this.props.expandByDefault) {\n      this.props.field.collapse();\n    } else {\n      this.props.field.toggle();\n    }\n  };\n\n  handleKeyPress = e => {\n    if (e.key === 'Enter') {\n      e.preventDefault();\n      this.toggle();\n    }\n  };\n\n  render() {\n    const { hidePropertiesPrefix } = this.context;\n    const { className = '', field, isLast, expandByDefault, fieldParentsName = [] } = this.props;\n    const { name, deprecated, required, kind } = field;\n    const withSubSchema = !field.schema.isPrimitive && !field.schema.isCircular;\n\n    const expanded = field.expanded === undefined ? expandByDefault : field.expanded;\n    const labels = (\n      <>\n        {kind === 'additionalProperties' && <PropertyLabel>additional property</PropertyLabel>}\n        {kind === 'patternProperties' && <PropertyLabel>pattern property</PropertyLabel>}\n        {required && <RequiredLabel>required</RequiredLabel>}\n      </>\n    );\n\n    const paramName = withSubSchema ? (\n      <ClickablePropertyNameCell\n        className={deprecated ? 'deprecated' : ''}\n        kind={kind}\n        title={name}\n      >\n        <PropertyBullet />\n        <button\n          onClick={this.toggle}\n          onKeyPress={this.handleKeyPress}\n          aria-label={`expand ${name}`}\n        >\n          {!hidePropertiesPrefix &&\n            fieldParentsName.map(\n              name => name + '.\\u200B', // zero-width space, a special character is used for correct line breaking\n            )}\n          <span className=\"property-name\">{name}</span>\n          <ShelfIcon direction={expanded ? 'down' : 'right'} />\n        </button>\n        {labels}\n      </ClickablePropertyNameCell>\n    ) : (\n      <PropertyNameCell className={deprecated ? 'deprecated' : undefined} kind={kind} title={name}>\n        <PropertyBullet />\n        {!hidePropertiesPrefix &&\n          fieldParentsName.map(\n            name => name + '.\\u200B', // zero-width space, a special character is used for correct line breaking\n          )}\n        <span className=\"property-name\">{name}</span>\n        {labels}\n      </PropertyNameCell>\n    );\n\n    return (\n      <>\n        <tr className={isLast ? 'last ' + className : className}>\n          {paramName}\n          <PropertyDetailsCell>\n            <FieldDetails {...this.props} />\n          </PropertyDetailsCell>\n        </tr>\n        {expanded && withSubSchema && (\n          <tr key={field.name + 'inner'}>\n            <PropertyCellWithInner colSpan={2}>\n              <InnerPropertiesWrap>\n                <Schema\n                  schema={field.schema}\n                  fieldParentsName={[...(fieldParentsName || []), field.name]}\n                  skipReadOnly={this.props.skipReadOnly}\n                  skipWriteOnly={this.props.skipWriteOnly}\n                  showTitle={this.props.showTitle}\n                  level={this.props.level}\n                />\n              </InnerPropertiesWrap>\n            </PropertyCellWithInner>\n          </tr>\n        )}\n      </>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Fields/FieldConstraints.tsx",
    "content": "import * as React from 'react';\nimport { ConstraintItem } from '../../common-elements/fields';\n\nexport interface ConstraintsViewProps {\n  constraints: string[];\n}\n\nexport class ConstraintsView extends React.PureComponent<ConstraintsViewProps> {\n  render() {\n    if (this.props.constraints.length === 0) {\n      return null;\n    }\n    return (\n      <span>\n        {' '}\n        {this.props.constraints.map(constraint => (\n          <ConstraintItem key={constraint}> {constraint} </ConstraintItem>\n        ))}\n      </span>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Fields/FieldDetail.tsx",
    "content": "import * as React from 'react';\nimport { ExampleValue, FieldLabel } from '../../common-elements/fields';\n\nexport interface FieldDetailProps {\n  value?: any;\n  label: string;\n  raw?: boolean;\n}\n\nfunction FieldDetailComponent({ value, label, raw }: FieldDetailProps) {\n  if (value === undefined) {\n    return null;\n  }\n\n  const stringifyValue = raw ? String(value) : JSON.stringify(value);\n\n  return (\n    <div>\n      <FieldLabel> {label} </FieldLabel> <ExampleValue>{stringifyValue}</ExampleValue>\n    </div>\n  );\n}\n\nexport const FieldDetail = React.memo<FieldDetailProps>(FieldDetailComponent);\n"
  },
  {
    "path": "src/components/Fields/FieldDetails.tsx",
    "content": "import * as React from 'react';\nimport { observer } from 'mobx-react';\n\nimport {\n  RecursiveLabel,\n  TypeFormat,\n  TypeName,\n  TypePrefix,\n  TypeTitle,\n} from '../../common-elements/fields';\nimport { getSerializedValue, isArray, isObject } from '../../utils';\nimport { ExternalDocumentation } from '../ExternalDocumentation/ExternalDocumentation';\nimport { Markdown } from '../Markdown/Markdown';\nimport { EnumValues } from './EnumValues';\nimport { Extensions } from './Extensions';\nimport { FieldProps } from './Field';\nimport { Examples } from './Examples';\nimport { ConstraintsView } from './FieldConstraints';\nimport { FieldDetail } from './FieldDetail';\n\nimport { Badge } from '../../common-elements/';\n\nimport { l } from '../../services/Labels';\nimport { OptionsContext } from '../OptionsProvider';\nimport { Pattern } from './Pattern';\nimport { ArrayItemDetails } from './ArrayItemDetails';\n\nexport const FieldDetailsComponent = observer((props: FieldProps) => {\n  const { enumSkipQuotes, hideSchemaTitles } = React.useContext(OptionsContext);\n\n  const { showExamples, field, renderDiscriminatorSwitch } = props;\n  const { schema, description, deprecated, extensions, in: _in, const: _const } = field;\n  const isArrayType =\n    schema.type === 'array' || (isArray(schema.type) && schema.type.includes('array'));\n\n  const rawDefault = enumSkipQuotes || _in === 'header'; // having quotes around header field default values is confusing and inappropriate\n\n  const renderedExamples = React.useMemo<JSX.Element | null>(() => {\n    if (showExamples && (field.example !== undefined || field.examples !== undefined)) {\n      if (field.examples !== undefined) {\n        return <Examples field={field} />;\n      } else {\n        return (\n          <FieldDetail\n            label={l('example') + ':'}\n            value={getSerializedValue(field, field.example)}\n            raw={Boolean(field.in)}\n          />\n        );\n      }\n    }\n\n    return null;\n  }, [field, showExamples]);\n  const defaultValue =\n    isObject(schema.default) && field.in\n      ? getSerializedValue(field, schema.default).replace(`${field.name}=`, '')\n      : schema.default;\n\n  return (\n    <div>\n      <div>\n        <TypePrefix>{schema.typePrefix}</TypePrefix>\n        <TypeName>{schema.displayType}</TypeName>\n        {schema.displayFormat && (\n          <TypeFormat>\n            {' '}\n            &lt;\n            {schema.displayFormat}\n            &gt;{' '}\n          </TypeFormat>\n        )}\n        {schema.contentEncoding && (\n          <TypeFormat>\n            {' '}\n            &lt;\n            {schema.contentEncoding}\n            &gt;{' '}\n          </TypeFormat>\n        )}\n        {schema.contentMediaType && (\n          <TypeFormat>\n            {' '}\n            &lt;\n            {schema.contentMediaType}\n            &gt;{' '}\n          </TypeFormat>\n        )}\n        {schema.title && !hideSchemaTitles && <TypeTitle> ({schema.title}) </TypeTitle>}\n        <ConstraintsView constraints={schema.constraints} />\n        <Pattern schema={schema} />\n        {schema.isCircular && <RecursiveLabel> {l('recursive')} </RecursiveLabel>}\n        {isArrayType && schema.items && <ArrayItemDetails schema={schema.items} />}\n      </div>\n      {deprecated && (\n        <div>\n          <Badge type=\"warning\"> {l('deprecated')} </Badge>\n        </div>\n      )}\n      <FieldDetail raw={rawDefault} label={l('default') + ':'} value={defaultValue} />\n      {!renderDiscriminatorSwitch && (\n        <EnumValues type={schema.type} values={schema['x-enumDescriptions'] || schema.enum} />\n      )}{' '}\n      {renderedExamples}\n      <Extensions extensions={{ ...extensions, ...schema.extensions }} />\n      <div>\n        <Markdown compact={true} source={description} />\n      </div>\n      {schema.externalDocs && (\n        <ExternalDocumentation externalDocs={schema.externalDocs} compact={true} />\n      )}\n      {(renderDiscriminatorSwitch && renderDiscriminatorSwitch(props)) || null}\n      {(_const && <FieldDetail label={l('const') + ':'} value={_const} />) || null}\n    </div>\n  );\n});\n\nexport const FieldDetails = React.memo<FieldProps>(FieldDetailsComponent);\n"
  },
  {
    "path": "src/components/Fields/Pattern.tsx",
    "content": "import * as React from 'react';\nimport { PatternLabel, ToggleButton } from '../../common-elements/fields';\nimport { OptionsContext } from '../OptionsProvider';\nimport { SchemaModel } from '../../services';\n\nconst MAX_PATTERN_LENGTH = 45;\n\nexport function Pattern(props: { schema: SchemaModel }) {\n  const pattern = props.schema.pattern;\n  const { hideSchemaPattern } = React.useContext(OptionsContext);\n  const [isPatternShown, setIsPatternShown] = React.useState(false);\n  const togglePattern = React.useCallback(\n    () => setIsPatternShown(!isPatternShown),\n    [isPatternShown],\n  );\n\n  if (!pattern || hideSchemaPattern) return null;\n\n  return (\n    <>\n      <PatternLabel>\n        {isPatternShown || pattern.length < MAX_PATTERN_LENGTH\n          ? pattern\n          : `${pattern.substr(0, MAX_PATTERN_LENGTH)}...`}\n      </PatternLabel>\n      {pattern.length > MAX_PATTERN_LENGTH && (\n        <ToggleButton onClick={togglePattern}>\n          {isPatternShown ? 'Hide pattern' : 'Show pattern'}\n        </ToggleButton>\n      )}\n    </>\n  );\n}\n"
  },
  {
    "path": "src/components/GenericChildrenSwitcher/GenericChildrenSwitcher.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { DropdownProps, DropdownOption } from '../../common-elements/Dropdown';\nimport { DropdownLabel, DropdownWrapper } from '../PayloadSamples/styled.elements';\n\nexport interface GenericChildrenSwitcherProps<T> {\n  items?: T[];\n  options: DropdownOption[];\n  label?: string;\n  renderDropdown: (props: DropdownProps) => JSX.Element;\n  children: (activeItem: T) => JSX.Element;\n}\n\nexport interface GenericChildrenSwitcherState {\n  activeItemIdx: number;\n}\n/**\n * TODO: Refactor this component:\n * Implement rendering dropdown/label directly in this component\n * Accept as a parameter mapper-function for building dropdown option labels\n */\n@observer\nexport class GenericChildrenSwitcher<T> extends React.Component<\n  GenericChildrenSwitcherProps<T>,\n  GenericChildrenSwitcherState\n> {\n  constructor(props) {\n    super(props);\n    this.state = {\n      activeItemIdx: 0,\n    };\n  }\n\n  switchItem = ({ idx }: DropdownOption) => {\n    if (this.props.items && idx !== undefined) {\n      this.setState({\n        activeItemIdx: idx,\n      });\n    }\n  };\n\n  render() {\n    const { items } = this.props;\n\n    if (!items || !items.length) {\n      return null;\n    }\n\n    const Wrapper = ({ children }) =>\n      this.props.label ? (\n        <DropdownWrapper>\n          <DropdownLabel>{this.props.label}</DropdownLabel>\n          {children}\n        </DropdownWrapper>\n      ) : (\n        children\n      );\n\n    return (\n      <>\n        <Wrapper>\n          {this.props.renderDropdown({\n            value: this.props.options[this.state.activeItemIdx].value,\n            options: this.props.options,\n            onChange: this.switchItem,\n            ariaLabel: this.props.label || 'Callback',\n          })}\n        </Wrapper>\n\n        {this.props.children(items[this.state.activeItemIdx])}\n      </>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/JsonViewer/JsonViewer.tsx",
    "content": "import * as React from 'react';\nimport styled from '../../styled-components';\n\nimport { SampleControls } from '../../common-elements';\nimport { CopyButtonWrapper } from '../../common-elements/CopyButtonWrapper';\nimport { PrismDiv } from '../../common-elements/PrismDiv';\nimport { jsonToHTML } from '../../utils/jsonToHtml';\nimport { OptionsContext } from '../OptionsProvider';\nimport { jsonStyles } from './style';\n\nexport interface JsonProps {\n  data: any;\n  className?: string;\n}\n\nconst JsonViewerWrap = styled.div`\n  &:hover > ${SampleControls} {\n    opacity: 1;\n  }\n`;\n\nconst Json = (props: JsonProps) => {\n  const [node, setNode] = React.useState<HTMLDivElement>();\n\n  const renderInner = ({ renderCopyButton }) => {\n    const showFoldingButtons =\n      props.data &&\n      Object.values(props.data).some(value => typeof value === 'object' && value !== null);\n\n    return (\n      <JsonViewerWrap>\n        <SampleControls>\n          {renderCopyButton()}\n          {showFoldingButtons && (\n            <>\n              <button onClick={expandAll}> Expand all </button>\n              <button onClick={collapseAll}> Collapse all </button>\n            </>\n          )}\n        </SampleControls>\n        <OptionsContext.Consumer>\n          {options => (\n            <PrismDiv\n              tabIndex={0}\n              className={props.className}\n              // tslint:disable-next-line\n              ref={node => setNode(node!)}\n              dangerouslySetInnerHTML={{\n                __html: jsonToHTML(props.data, options.jsonSamplesExpandLevel),\n              }}\n            />\n          )}\n        </OptionsContext.Consumer>\n      </JsonViewerWrap>\n    );\n  };\n\n  const expandAll = () => {\n    const elements = node?.getElementsByClassName('collapsible');\n    for (const collapsed of Array.prototype.slice.call(elements)) {\n      const parentNode = collapsed.parentNode as Element;\n      parentNode.classList.remove('collapsed');\n      parentNode.querySelector('.collapser')!.setAttribute('aria-label', 'collapse');\n    }\n  };\n\n  const collapseAll = () => {\n    const elements = node?.getElementsByClassName('collapsible');\n    // skip first item to avoid collapsing whole object/array\n    const elementsArr = Array.prototype.slice.call(elements, 1);\n\n    for (const expanded of elementsArr) {\n      const parentNode = expanded.parentNode as Element;\n      parentNode.classList.add('collapsed');\n      parentNode.querySelector('.collapser')!.setAttribute('aria-label', 'expand');\n    }\n  };\n\n  const collapseElement = (target: HTMLElement) => {\n    let collapsed;\n    if (target.className === 'collapser') {\n      collapsed = target.parentElement!.getElementsByClassName('collapsible')[0];\n      if (collapsed.parentElement.classList.contains('collapsed')) {\n        collapsed.parentElement.classList.remove('collapsed');\n        target.setAttribute('aria-label', 'collapse');\n      } else {\n        collapsed.parentElement.classList.add('collapsed');\n        target.setAttribute('aria-label', 'expand');\n      }\n    }\n  };\n\n  const clickListener = React.useCallback((event: MouseEvent) => {\n    collapseElement(event.target as HTMLElement);\n  }, []);\n\n  const focusListener = React.useCallback((event: KeyboardEvent) => {\n    if (event.key === 'Enter') {\n      collapseElement(event.target as HTMLElement);\n    }\n  }, []);\n\n  React.useEffect(() => {\n    node?.addEventListener('click', clickListener);\n    node?.addEventListener('focus', focusListener);\n    return () => {\n      node?.removeEventListener('click', clickListener);\n      node?.removeEventListener('focus', focusListener);\n    };\n  }, [clickListener, focusListener, node]);\n\n  return <CopyButtonWrapper data={props.data}>{renderInner}</CopyButtonWrapper>;\n};\n\nexport const JsonViewer = styled(Json)`\n  ${jsonStyles};\n`;\n"
  },
  {
    "path": "src/components/JsonViewer/index.tsx",
    "content": "export * from './JsonViewer';\n"
  },
  {
    "path": "src/components/JsonViewer/style.ts",
    "content": "import { css } from '../../styled-components';\n\nexport const jsonStyles = css`\n  .redoc-json code > .collapser {\n    display: none;\n    pointer-events: none;\n  }\n\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  font-size: ${props => props.theme.typography.code.fontSize};\n\n  white-space: ${({ theme }) => (theme.typography.code.wrap ? 'pre-wrap' : 'pre')};\n  contain: content;\n  overflow-x: auto;\n\n  .callback-function {\n    color: gray;\n  }\n\n  .collapser:after {\n    content: '-';\n    cursor: pointer;\n  }\n\n  .collapsed > .collapser:after {\n    content: '+';\n    cursor: pointer;\n  }\n\n  .ellipsis:after {\n    content: ' … ';\n  }\n\n  .collapsible {\n    margin-left: 2em;\n  }\n\n  .hoverable {\n    padding-top: 1px;\n    padding-bottom: 1px;\n    padding-left: 2px;\n    padding-right: 2px;\n    border-radius: 2px;\n  }\n\n  .hovered {\n    background-color: rgba(235, 238, 249, 1);\n  }\n\n  .collapser {\n    background-color: transparent;\n    border: 0;\n    color: #fff;\n    font-family: ${props => props.theme.typography.code.fontFamily};\n    font-size: ${props => props.theme.typography.code.fontSize};\n    padding-right: 6px;\n    padding-left: 6px;\n    padding-top: 0;\n    padding-bottom: 0;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 15px;\n    height: 15px;\n    position: absolute;\n    top: 4px;\n    left: -1.5em;\n    cursor: default;\n    user-select: none;\n    -webkit-user-select: none;\n    padding: 2px;\n    &:focus {\n      outline-color: #fff;\n      outline-style: dotted;\n      outline-width: 1px;\n    }\n  }\n\n  ul {\n    list-style-type: none;\n    padding: 0px;\n    margin: 0px 0px 0px 26px;\n  }\n\n  li {\n    position: relative;\n    display: block;\n  }\n\n  .hoverable {\n    display: inline-block;\n  }\n\n  .selected {\n    outline-style: solid;\n    outline-width: 1px;\n    outline-style: dotted;\n  }\n\n  .collapsed > .collapsible {\n    display: none;\n  }\n\n  .ellipsis {\n    display: none;\n  }\n\n  .collapsed > .ellipsis {\n    display: inherit;\n  }\n`;\n"
  },
  {
    "path": "src/components/Loading/Loading.tsx",
    "content": "import * as React from 'react';\nimport styled from '../../styled-components';\n\nimport { Spinner } from './Spinner.svg';\n\nconst LoadingMessage = styled.div<{ color: string }>`\n  font-family: helvetica, sans;\n  width: 100%;\n  text-align: center;\n  font-size: 25px;\n  margin: 30px 0 20px 0;\n  color: ${props => props.color};\n`;\n\nexport interface LoadingProps {\n  color: string;\n}\n\nexport class Loading extends React.PureComponent<LoadingProps> {\n  render() {\n    return (\n      <div style={{ textAlign: 'center' }}>\n        <LoadingMessage color={this.props.color}>Loading ...</LoadingMessage>\n        <Spinner color={this.props.color} />\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Loading/Spinner.svg.tsx",
    "content": "import * as React from 'react';\nimport styled, { keyframes } from '../../styled-components';\n\nconst _Spinner = (props: { className?: string; color: string }) => (\n  <svg className={props.className} version=\"1.1\" width=\"512\" height=\"512\" viewBox=\"0 0 512 512\">\n    <path d=\"M275.682 147.999c0 10.864-8.837 19.661-19.682 19.661v0c-10.875 0-19.681-8.796-19.681-19.661v-96.635c0-10.885 8.806-19.661 19.681-19.661v0c10.844 0 19.682 8.776 19.682 19.661v96.635z\" />\n    <path d=\"M275.682 460.615c0 10.865-8.837 19.682-19.682 19.682v0c-10.875 0-19.681-8.817-19.681-19.682v-96.604c0-10.885 8.806-19.681 19.681-19.681v0c10.844 0 19.682 8.796 19.682 19.682v96.604z\" />\n    <path d=\"M147.978 236.339c10.885 0 19.681 8.755 19.681 19.641v0c0 10.885-8.796 19.702-19.681 19.702h-96.624c-10.864 0-19.661-8.817-19.661-19.702v0c0-10.885 8.796-19.641 19.661-19.641h96.624z\" />\n    <path d=\"M460.615 236.339c10.865 0 19.682 8.755 19.682 19.641v0c0 10.885-8.817 19.702-19.682 19.702h-96.584c-10.885 0-19.722-8.817-19.722-19.702v0c0-10.885 8.837-19.641 19.722-19.641h96.584z\" />\n    <path d=\"M193.546 165.703c7.69 7.66 7.68 20.142 0 27.822v0c-7.701 7.701-20.162 7.701-27.853 0.020l-68.311-68.322c-7.68-7.701-7.68-20.142 0-27.863v0c7.68-7.68 20.121-7.68 27.822 0l68.342 68.342z\" />\n    <path d=\"M414.597 386.775c7.7 7.68 7.7 20.163 0.021 27.863v0c-7.7 7.659-20.142 7.659-27.843-0.062l-68.311-68.26c-7.68-7.7-7.68-20.204 0-27.863v0c7.68-7.7 20.163-7.7 27.842 0l68.291 68.322z\" />\n    <path d=\"M165.694 318.464c7.69-7.7 20.153-7.7 27.853 0v0c7.68 7.659 7.69 20.163 0 27.863l-68.342 68.322c-7.67 7.659-20.142 7.659-27.822-0.062v0c-7.68-7.68-7.68-20.122 0-27.801l68.311-68.322z\" />\n    <path d=\"M386.775 97.362c7.7-7.68 20.142-7.68 27.822 0v0c7.7 7.68 7.7 20.183 0.021 27.863l-68.322 68.311c-7.68 7.68-20.163 7.68-27.843-0.020v0c-7.68-7.68-7.68-20.162 0-27.822l68.322-68.332z\" />\n  </svg>\n);\n\nconst rotate = keyframes`\n  0% {\n    transform: rotate(0deg); }\n  100% {\n    transform: rotate(360deg);\n  }\n`;\n\nexport const Spinner = styled(_Spinner)`\n  animation: 2s ${rotate} linear infinite;\n  width: 50px;\n  height: 50px;\n  content: '';\n  display: inline-block;\n  margin-left: -25px;\n\n  path {\n    fill: ${props => props.color};\n  }\n`;\n"
  },
  {
    "path": "src/components/Markdown/AdvancedMarkdown.tsx",
    "content": "import * as React from 'react';\n\nimport { AppStore, MarkdownRenderer, RedocNormalizedOptions } from '../../services';\nimport { BaseMarkdownProps } from './Markdown';\nimport { SanitizedMarkdownHTML } from './SanitizedMdBlock';\n\nimport { OptionsConsumer } from '../OptionsProvider';\nimport { StoreConsumer } from '../StoreBuilder';\n\nexport interface AdvancedMarkdownProps extends BaseMarkdownProps {\n  htmlWrap?: (part: JSX.Element) => JSX.Element;\n  parentId?: string;\n}\n\nexport class AdvancedMarkdown extends React.Component<AdvancedMarkdownProps> {\n  render() {\n    return (\n      <OptionsConsumer>\n        {options => (\n          <StoreConsumer>{store => this.renderWithOptionsAndStore(options, store)}</StoreConsumer>\n        )}\n      </OptionsConsumer>\n    );\n  }\n\n  renderWithOptionsAndStore(options: RedocNormalizedOptions, store?: AppStore) {\n    const { source, htmlWrap = i => i } = this.props;\n    if (!store) {\n      throw new Error('When using components in markdown, store prop must be provided');\n    }\n\n    const renderer = new MarkdownRenderer(options, this.props.parentId);\n    const parts = renderer.renderMdWithComponents(source);\n\n    if (!parts.length) {\n      return null;\n    }\n\n    return parts.map((part, idx) => {\n      if (typeof part === 'string') {\n        return React.cloneElement(\n          htmlWrap(<SanitizedMarkdownHTML html={part} inline={false} compact={false} />),\n          { key: idx },\n        );\n      }\n      const PartComponent = part.component as React.FunctionComponent;\n      return <PartComponent key={idx} {...{ ...part.props, ...part.propsSelector(store) }} />;\n    });\n  }\n}\n"
  },
  {
    "path": "src/components/Markdown/Markdown.tsx",
    "content": "import * as React from 'react';\n\nimport { MarkdownRenderer } from '../../services';\nimport { SanitizedMarkdownHTML } from './SanitizedMdBlock';\n\nexport interface StylingMarkdownProps {\n  compact?: boolean;\n  inline?: boolean;\n}\n\nexport interface BaseMarkdownProps {\n  sanitize?: boolean;\n  source: string;\n}\n\nexport type MarkdownProps = BaseMarkdownProps &\n  StylingMarkdownProps & {\n    source: string;\n    className?: string;\n    'data-role'?: string;\n  };\n\nexport class Markdown extends React.Component<MarkdownProps> {\n  render() {\n    const { source, inline, compact, className, 'data-role': dataRole } = this.props;\n    const renderer = new MarkdownRenderer();\n    return (\n      <SanitizedMarkdownHTML\n        html={renderer.renderMd(source)}\n        inline={inline}\n        compact={compact}\n        className={className}\n        data-role={dataRole}\n      />\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Markdown/SanitizedMdBlock.tsx",
    "content": "import * as DOMPurify from 'dompurify';\nimport * as React from 'react';\n\nimport { OptionsConsumer } from '../OptionsProvider';\nimport { StylingMarkdownProps } from './Markdown';\nimport { StyledMarkdownBlock } from './styled.elements';\nimport styled from 'styled-components';\n\n// Workaround for DOMPurify type issues (https://github.com/cure53/DOMPurify/issues/1034)\nconst dompurify = DOMPurify['default'] as DOMPurify.DOMPurify;\n\nconst StyledMarkdownSpan = styled(StyledMarkdownBlock)`\n  display: inline;\n`;\n\nconst sanitize = (sanitize, html) => (sanitize ? dompurify.sanitize(html) : html);\n\nexport function SanitizedMarkdownHTML({\n  inline,\n  compact,\n  ...rest\n}: StylingMarkdownProps & { html: string; className?: string; 'data-role'?: string }) {\n  const Wrap = inline ? StyledMarkdownSpan : StyledMarkdownBlock;\n\n  return (\n    <OptionsConsumer>\n      {options => (\n        <Wrap\n          className={'redoc-markdown ' + (rest.className || '')}\n          dangerouslySetInnerHTML={{\n            __html: sanitize(options.sanitize, rest.html),\n          }}\n          data-role={rest['data-role']}\n          {...rest}\n          $inline={inline}\n          $compact={compact}\n        />\n      )}\n    </OptionsConsumer>\n  );\n}\n"
  },
  {
    "path": "src/components/Markdown/styled.elements.tsx",
    "content": "import { headerCommonMixin, linkifyMixin } from '../../common-elements';\nimport { PrismDiv } from '../../common-elements/PrismDiv';\nimport styled, { css, extensionsHook, ResolvedThemeInterface } from '../../styled-components';\n\nimport { StyledComponent } from 'styled-components';\n\nexport const linksCss = css`\n  a {\n    text-decoration: ${props => props.theme.typography.links.textDecoration};\n    color: ${props => props.theme.typography.links.color};\n\n    &:visited {\n      color: ${props => props.theme.typography.links.visited};\n    }\n\n    &:hover {\n      color: ${props => props.theme.typography.links.hover};\n      text-decoration: ${props => props.theme.typography.links.hoverTextDecoration};\n    }\n  }\n`;\n\nexport const StyledMarkdownBlock = styled(\n  PrismDiv as StyledComponent<\n    'div',\n    ResolvedThemeInterface,\n    { $compact?: boolean; $inline?: boolean }\n  >,\n)`\n  font-family: ${props => props.theme.typography.fontFamily};\n  font-weight: ${props => props.theme.typography.fontWeightRegular};\n  line-height: ${props => props.theme.typography.lineHeight};\n\n  p {\n    &:last-child {\n      margin-bottom: 0;\n    }\n  }\n\n  ${({ $compact }) =>\n    $compact &&\n    `\n    p:first-child {\n      margin-top: 0;\n    }\n    p:last-child {\n      margin-bottom: 0;\n    }\n  `}\n\n  ${({ $inline }) =>\n    $inline &&\n    ` p {\n    display: inline-block;\n  }`}\n\n  h1 {\n    ${headerCommonMixin(1)};\n    color: ${props => props.theme.colors.primary.main};\n    margin-top: 0;\n  }\n\n  h2 {\n    ${headerCommonMixin(2)};\n    color: ${props => props.theme.colors.text.primary};\n  }\n\n  code {\n    color: ${({ theme }) => theme.typography.code.color};\n    background-color: ${({ theme }) => theme.typography.code.backgroundColor};\n\n    font-family: ${props => props.theme.typography.code.fontFamily};\n    border-radius: 2px;\n    border: 1px solid rgba(38, 50, 56, 0.1);\n    padding: 0 ${({ theme }) => theme.spacing.unit}px;\n    font-size: ${props => props.theme.typography.code.fontSize};\n    font-weight: ${({ theme }) => theme.typography.code.fontWeight};\n\n    word-break: break-word;\n  }\n\n  pre {\n    font-family: ${props => props.theme.typography.code.fontFamily};\n    white-space: ${({ theme }) => (theme.typography.code.wrap ? 'pre-wrap' : 'pre')};\n    background-color: ${({ theme }) => theme.codeBlock.backgroundColor};\n    color: white;\n    padding: ${props => props.theme.spacing.unit * 4}px;\n    overflow-x: auto;\n    line-height: normal;\n    border-radius: 0;\n    border: 1px solid rgba(38, 50, 56, 0.1);\n\n    code {\n      background-color: transparent;\n      color: white;\n      padding: 0;\n\n      &:before,\n      &:after {\n        content: none;\n      }\n    }\n  }\n\n  blockquote {\n    margin: 0;\n    margin-bottom: 1em;\n    padding: 0 15px;\n    color: #777;\n    border-left: 4px solid #ddd;\n  }\n\n  img {\n    max-width: 100%;\n    box-sizing: content-box;\n  }\n\n  ul,\n  ol {\n    padding-left: 2em;\n    margin: 0;\n    margin-bottom: 1em;\n\n    ul,\n    ol {\n      margin-bottom: 0;\n      margin-top: 0;\n    }\n  }\n\n  table {\n    display: block;\n    width: 100%;\n    overflow: auto;\n    word-break: normal;\n    word-break: keep-all;\n    border-collapse: collapse;\n    border-spacing: 0;\n    margin-top: 1.5em;\n    margin-bottom: 1.5em;\n  }\n\n  table tr {\n    background-color: #fff;\n    border-top: 1px solid #ccc;\n\n    &:nth-child(2n) {\n      background-color: ${({ theme }) => theme.schema.nestedBackground};\n    }\n  }\n\n  table th,\n  table td {\n    padding: 6px 13px;\n    border: 1px solid #ddd;\n  }\n\n  table th {\n    text-align: left;\n    font-weight: bold;\n  }\n\n  ${linkifyMixin('.share-link')};\n\n  ${linksCss}\n\n  ${extensionsHook('Markdown')};\n`;\n"
  },
  {
    "path": "src/components/MediaTypeSwitch/MediaTypesSwitch.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { DropdownOption, DropdownProps } from '../../common-elements/Dropdown';\nimport { MediaContentModel, MediaTypeModel, SchemaModel } from '../../services/models';\nimport { DropdownLabel, DropdownWrapper } from '../PayloadSamples/styled.elements';\n\nexport interface MediaTypeChildProps {\n  schema: SchemaModel;\n  mime?: string;\n}\n\nexport interface MediaTypesSwitchProps {\n  content?: MediaContentModel;\n  withLabel?: boolean;\n\n  renderDropdown: (props: DropdownProps) => JSX.Element;\n  children: (activeMime: MediaTypeModel) => JSX.Element;\n}\n\n@observer\nexport class MediaTypesSwitch extends React.Component<MediaTypesSwitchProps> {\n  switchMedia = ({ idx }: DropdownOption) => {\n    if (this.props.content && idx !== undefined) {\n      this.props.content.activate(idx);\n    }\n  };\n\n  render() {\n    const { content } = this.props;\n    if (!content || !content.mediaTypes || !content.mediaTypes.length) {\n      return null;\n    }\n    const activeMimeIdx = content.activeMimeIdx;\n\n    const options = content.mediaTypes.map((mime, idx) => {\n      return {\n        value: mime.name,\n        idx,\n      };\n    });\n\n    const Wrapper = ({ children }) =>\n      this.props.withLabel ? (\n        <DropdownWrapper>\n          <DropdownLabel>Content type</DropdownLabel>\n          {children}\n        </DropdownWrapper>\n      ) : (\n        children\n      );\n\n    return (\n      <>\n        <Wrapper>\n          {this.props.renderDropdown({\n            value: options[activeMimeIdx].value,\n            options,\n            onChange: this.switchMedia,\n            ariaLabel: 'Content type',\n          })}\n        </Wrapper>\n        {this.props.children(content.active)}\n      </>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Operation/Operation.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { Badge, DarkRightPanel, H2, MiddlePanel, Row } from '../../common-elements';\nimport { ShareLink } from '../../common-elements/linkify';\nimport { OperationModel } from '../../services/models';\nimport styled from '../../styled-components';\nimport { CallbacksList } from '../Callbacks';\nimport { CallbackSamples } from '../CallbackSamples/CallbackSamples';\nimport { Endpoint } from '../Endpoint/Endpoint';\nimport { ExternalDocumentation } from '../ExternalDocumentation/ExternalDocumentation';\nimport { Extensions } from '../Fields/Extensions';\nimport { Markdown } from '../Markdown/Markdown';\nimport { OptionsContext } from '../OptionsProvider';\nimport { Parameters } from '../Parameters/Parameters';\nimport { RequestSamples } from '../RequestSamples/RequestSamples';\nimport { ResponsesList } from '../Responses/ResponsesList';\nimport { ResponseSamples } from '../ResponseSamples/ResponseSamples';\nimport { SecurityRequirements } from '../SecurityRequirement/SecurityRequirement';\nimport { SECTION_ATTR } from '../../services';\n\nconst Description = styled.div`\n  margin-bottom: ${({ theme }) => theme.spacing.unit * 6}px;\n`;\n\nexport interface OperationProps {\n  operation: OperationModel;\n}\n\nexport const Operation = observer(({ operation }: OperationProps): JSX.Element => {\n  const {\n    name: summary,\n    description,\n    deprecated,\n    externalDocs,\n    isWebhook,\n    httpVerb,\n    badges,\n  } = operation;\n  const hasDescription = !!(description || externalDocs);\n  const { showWebhookVerb } = React.useContext(OptionsContext);\n  const badgesBefore = badges.filter(({ position }) => position === 'before');\n  const badgesAfter = badges.filter(({ position }) => position === 'after');\n\n  return (\n    <OptionsContext.Consumer>\n      {options => (\n        <Row {...{ [SECTION_ATTR]: operation.operationHash }} id={operation.operationHash}>\n          <MiddlePanel>\n            <H2>\n              <ShareLink to={operation.id} />\n              {badgesBefore.map(({ name, color }) => (\n                <Badge type=\"primary\" key={name} color={color}>\n                  {name}\n                </Badge>\n              ))}\n              {summary} {deprecated && <Badge type=\"warning\"> Deprecated </Badge>}\n              {isWebhook && (\n                <Badge type=\"primary\">\n                  {' '}\n                  Webhook {showWebhookVerb && httpVerb && '| ' + httpVerb.toUpperCase()}\n                </Badge>\n              )}\n              {badgesAfter.map(({ name, color }) => (\n                <Badge type=\"primary\" key={name} color={color}>\n                  {name}\n                </Badge>\n              ))}\n            </H2>\n            {options.pathInMiddlePanel && !isWebhook && (\n              <Endpoint operation={operation} inverted={true} />\n            )}\n            {hasDescription && (\n              <Description>\n                {description !== undefined && <Markdown source={description} />}\n                {externalDocs && <ExternalDocumentation externalDocs={externalDocs} />}\n              </Description>\n            )}\n            <Extensions extensions={operation.extensions} />\n            <SecurityRequirements securities={operation.security} />\n            <Parameters parameters={operation.parameters} body={operation.requestBody} />\n            <ResponsesList responses={operation.responses} />\n            <CallbacksList callbacks={operation.callbacks} />\n          </MiddlePanel>\n          <DarkRightPanel>\n            {!options.pathInMiddlePanel && !isWebhook && <Endpoint operation={operation} />}\n            <RequestSamples operation={operation} />\n            <ResponseSamples operation={operation} />\n            <CallbackSamples callbacks={operation.callbacks} />\n          </DarkRightPanel>\n        </Row>\n      )}\n    </OptionsContext.Consumer>\n  );\n});\n"
  },
  {
    "path": "src/components/OptionsProvider.ts",
    "content": "import * as React from 'react';\n\nimport { RedocNormalizedOptions } from '../services/RedocNormalizedOptions';\n\nexport const OptionsContext = React.createContext(new RedocNormalizedOptions({}));\nexport const OptionsProvider = OptionsContext.Provider;\nexport const OptionsConsumer = OptionsContext.Consumer;\n"
  },
  {
    "path": "src/components/Parameters/Parameters.tsx",
    "content": "import * as React from 'react';\nimport { DropdownOrLabel, DropdownOrLabelProps } from '../DropdownOrLabel/DropdownOrLabel';\nimport { ParametersGroup } from './ParametersGroup';\n\nimport { UnderlinedHeader } from '../../common-elements';\n\nimport { MediaContentModel } from '../../services';\nimport { FieldModel, RequestBodyModel } from '../../services/models';\nimport { MediaTypesSwitch } from '../MediaTypeSwitch/MediaTypesSwitch';\nimport { Schema } from '../Schema';\n\nimport { Markdown } from '../Markdown/Markdown';\nimport { ConstraintsView } from '../Fields/FieldConstraints';\nimport { RequiredLabel } from '../../common-elements/fields';\nimport styled from '../../styled-components';\n\nfunction safePush(obj, prop, item) {\n  if (!obj[prop]) {\n    obj[prop] = [];\n  }\n  obj[prop].push(item);\n}\n\nexport interface ParametersProps {\n  parameters?: FieldModel[];\n  body?: RequestBodyModel;\n}\n\nconst PARAM_PLACES = ['path', 'query', 'cookie', 'header'];\n\nexport class Parameters extends React.PureComponent<ParametersProps> {\n  orderParams(params: FieldModel[]): Record<string, FieldModel[]> {\n    const res = {};\n    params.forEach(param => {\n      safePush(res, param.in, param);\n    });\n    return res;\n  }\n\n  render() {\n    const { body, parameters = [] } = this.props;\n    if (body === undefined && parameters === undefined) {\n      return null;\n    }\n\n    const paramsMap = this.orderParams(parameters);\n\n    const paramsPlaces = parameters.length > 0 ? PARAM_PLACES : [];\n\n    const bodyContent = body && body.content;\n\n    const bodyDescription = body && body.description;\n\n    const bodyRequired = body && body.required;\n\n    return (\n      <>\n        {paramsPlaces.map(place => (\n          <ParametersGroup key={place} place={place} parameters={paramsMap[place]} />\n        ))}\n        {bodyContent && (\n          <BodyContent\n            content={bodyContent}\n            description={bodyDescription}\n            bodyRequired={bodyRequired}\n          />\n        )}\n      </>\n    );\n  }\n}\n\nfunction DropdownWithinHeader({\n  bodyRequired,\n  ...props\n}: DropdownOrLabelProps & { bodyRequired?: boolean }) {\n  const isRequired = typeof bodyRequired === 'boolean' && !!bodyRequired;\n  const isOptional = typeof bodyRequired === 'boolean' && !bodyRequired;\n\n  return (\n    <UnderlinedHeader key=\"header\">\n      Request Body schema: <DropdownOrLabel {...props} />\n      {isRequired && <RequiredBody>required</RequiredBody>}\n      {isOptional && <OptionalBody>optional</OptionalBody>}\n    </UnderlinedHeader>\n  );\n}\n\nexport function BodyContent(props: {\n  content: MediaContentModel;\n  description?: string;\n  bodyRequired?: boolean;\n}): JSX.Element {\n  const { content, description, bodyRequired } = props;\n  const { isRequestType } = content;\n  return (\n    <MediaTypesSwitch\n      content={content}\n      renderDropdown={props => <DropdownWithinHeader bodyRequired={bodyRequired} {...props} />}\n    >\n      {({ schema }) => {\n        return (\n          <>\n            {description !== undefined && <Markdown source={description} />}\n            {schema?.type === 'object' && (\n              <ConstraintsView constraints={schema?.constraints || []} />\n            )}\n            <Schema\n              skipReadOnly={isRequestType}\n              skipWriteOnly={!isRequestType}\n              key=\"schema\"\n              schema={schema}\n            />\n          </>\n        );\n      }}\n    </MediaTypesSwitch>\n  );\n}\n\nconst commonStyles = `\n  text-transform: lowercase;\n  margin-left: 0;\n  line-height: 1.5em;\n`;\n\nconst RequiredBody = styled(RequiredLabel)`\n  ${commonStyles}\n`;\n\nconst OptionalBody = styled('div')`\n  ${commonStyles}\n  color: ${({ theme }) => theme.colors.text.secondary};\n  font-size: ${props => props.theme.schema.labelsTextSize};\n`;\n"
  },
  {
    "path": "src/components/Parameters/ParametersGroup.tsx",
    "content": "import * as React from 'react';\n\nimport { UnderlinedHeader } from '../../common-elements';\nimport { PropertiesTable } from '../../common-elements/fields-layout';\n\nimport { FieldModel } from '../../services/models';\nimport { Field } from '../Fields/Field';\n\nimport { mapWithLast } from '../../utils';\n\nexport interface ParametersGroupProps {\n  place: string;\n  parameters: FieldModel[];\n}\n\nexport class ParametersGroup extends React.PureComponent<ParametersGroupProps, any> {\n  render() {\n    const { place, parameters } = this.props;\n    if (!parameters || !parameters.length) {\n      return null;\n    }\n\n    return (\n      <div key={place}>\n        <UnderlinedHeader>{place} Parameters</UnderlinedHeader>\n        <PropertiesTable>\n          <tbody>\n            {mapWithLast(parameters, (field, isLast) => (\n              <Field key={field.name} isLast={isLast} field={field} showExamples={true} />\n            ))}\n          </tbody>\n        </PropertiesTable>\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/PayloadSamples/Example.tsx",
    "content": "import * as React from 'react';\n\nimport { StyledPre } from '../../common-elements/samples';\nimport { ExampleModel } from '../../services/models';\nimport { ExampleValue } from './ExampleValue';\nimport { useExternalExample } from './exernalExampleHook';\n\nexport interface ExampleProps {\n  example: ExampleModel;\n  mimeType: string;\n}\n\nexport function Example({ example, mimeType }: ExampleProps) {\n  if (example.value === undefined && example.externalValueUrl) {\n    return <ExternalExample example={example} mimeType={mimeType} />;\n  } else {\n    return <ExampleValue value={example.value} mimeType={mimeType} />;\n  }\n}\n\nexport function ExternalExample({ example, mimeType }: ExampleProps) {\n  const value = useExternalExample(example, mimeType);\n\n  if (value === undefined) {\n    return <span>Loading...</span>;\n  }\n\n  if (value instanceof Error) {\n    return (\n      <StyledPre>\n        Error loading external example: <br />\n        <a\n          className={'token string'}\n          href={example.externalValueUrl}\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          {example.externalValueUrl}\n        </a>\n      </StyledPre>\n    );\n  }\n\n  return <ExampleValue value={value} mimeType={mimeType} />;\n}\n"
  },
  {
    "path": "src/components/PayloadSamples/ExampleValue.tsx",
    "content": "import * as React from 'react';\n\nimport { isJsonLike, langFromMime } from '../../utils/openapi';\nimport { JsonViewer } from '../JsonViewer/JsonViewer';\nimport { SourceCodeWithCopy } from '../SourceCode/SourceCode';\n\nexport interface ExampleValueProps {\n  value: any;\n  mimeType: string;\n}\n\nexport function ExampleValue({ value, mimeType }: ExampleValueProps) {\n  if (isJsonLike(mimeType)) {\n    return <JsonViewer data={value} />;\n  } else {\n    if (typeof value === 'object') {\n      // just in case example was cached as json but used as non-json\n      value = JSON.stringify(value, null, 2);\n    }\n    return <SourceCodeWithCopy lang={langFromMime(mimeType)} source={value} />;\n  }\n}\n"
  },
  {
    "path": "src/components/PayloadSamples/MediaTypeSamples.tsx",
    "content": "import * as React from 'react';\n\nimport styled from '../../styled-components';\n\nimport { DropdownOption, DropdownProps } from '../../common-elements';\nimport { MediaTypeModel } from '../../services/models';\nimport { Markdown } from '../Markdown/Markdown';\nimport { Example } from './Example';\nimport { DropdownLabel, DropdownWrapper, NoSampleLabel } from './styled.elements';\n\nexport interface PayloadSamplesProps {\n  mediaType: MediaTypeModel;\n  renderDropdown: (props: DropdownProps) => JSX.Element;\n}\n\ninterface MediaTypeSamplesState {\n  activeIdx: number;\n}\n\nexport class MediaTypeSamples extends React.Component<PayloadSamplesProps, MediaTypeSamplesState> {\n  state = {\n    activeIdx: 0,\n  };\n  switchMedia = ({ idx }: DropdownOption) => {\n    if (idx !== undefined) {\n      this.setState({\n        activeIdx: idx,\n      });\n    }\n  };\n  render() {\n    const { activeIdx } = this.state;\n    const examples = this.props.mediaType.examples || {};\n    const mimeType = this.props.mediaType.name;\n\n    const noSample = <NoSampleLabel>No sample</NoSampleLabel>;\n\n    const examplesNames = Object.keys(examples);\n    if (examplesNames.length === 0) {\n      return noSample;\n    }\n\n    if (examplesNames.length > 1) {\n      const options = examplesNames.map((name, idx) => {\n        return {\n          value: examples[name].summary || name,\n          idx,\n        };\n      });\n\n      const example = examples[examplesNames[activeIdx]];\n      const description = example.description;\n\n      return (\n        <SamplesWrapper>\n          <DropdownWrapper>\n            <DropdownLabel>Example</DropdownLabel>\n            {this.props.renderDropdown({\n              value: options[activeIdx].value,\n              options,\n              onChange: this.switchMedia,\n              ariaLabel: 'Example',\n            })}\n          </DropdownWrapper>\n          <div>\n            {description && <Markdown source={description} />}\n            <Example example={example} mimeType={mimeType} />\n          </div>\n        </SamplesWrapper>\n      );\n    } else {\n      const example = examples[examplesNames[0]];\n      return (\n        <SamplesWrapper>\n          {example.description && <Markdown source={example.description} />}\n          <Example example={example} mimeType={mimeType} />\n        </SamplesWrapper>\n      );\n    }\n  }\n}\n\nconst SamplesWrapper = styled.div`\n  margin-top: 15px;\n`;\n"
  },
  {
    "path": "src/components/PayloadSamples/PayloadSamples.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { MediaTypeSamples } from './MediaTypeSamples';\n\nimport { MediaContentModel } from '../../services/models';\nimport { DropdownOrLabel } from '../DropdownOrLabel/DropdownOrLabel';\nimport { MediaTypesSwitch } from '../MediaTypeSwitch/MediaTypesSwitch';\nimport { InvertedSimpleDropdown, MimeLabel } from './styled.elements';\n\nexport interface PayloadSamplesProps {\n  content: MediaContentModel;\n}\n\n@observer\nexport class PayloadSamples extends React.Component<PayloadSamplesProps> {\n  render() {\n    const mimeContent = this.props.content;\n    if (mimeContent === undefined) {\n      return null;\n    }\n\n    return (\n      <MediaTypesSwitch content={mimeContent} renderDropdown={this.renderDropdown} withLabel={true}>\n        {mediaType => (\n          <MediaTypeSamples\n            key=\"samples\"\n            mediaType={mediaType}\n            renderDropdown={this.renderDropdown}\n          />\n        )}\n      </MediaTypesSwitch>\n    );\n  }\n\n  private renderDropdown = props => {\n    return (\n      <DropdownOrLabel\n        Label={MimeLabel}\n        Dropdown={InvertedSimpleDropdown}\n        {...props}\n        variant=\"dark\"\n      />\n    );\n  };\n}\n"
  },
  {
    "path": "src/components/PayloadSamples/exernalExampleHook.ts",
    "content": "import { useEffect, useRef, useState } from 'react';\nimport { ExampleModel } from '../../services/models/Example';\n\nexport function useExternalExample(example: ExampleModel, mimeType: string) {\n  const [, setIsLoading] = useState(true); // to trigger component reload\n\n  const value = useRef<any>(undefined);\n  const prevRef = useRef<ExampleModel | undefined>(undefined);\n\n  if (prevRef.current !== example) {\n    value.current = undefined;\n  }\n\n  prevRef.current = example;\n\n  useEffect(() => {\n    const load = async () => {\n      setIsLoading(true);\n      try {\n        value.current = await example.getExternalValue(mimeType);\n      } catch (e) {\n        value.current = e;\n      }\n      setIsLoading(false);\n    };\n\n    load();\n  }, [example, mimeType]);\n\n  return value.current;\n}\n"
  },
  {
    "path": "src/components/PayloadSamples/styled.elements.ts",
    "content": "import { transparentize } from 'polished';\nimport styled from '../../styled-components';\nimport { Dropdown } from '../../common-elements/Dropdown';\n\nexport const MimeLabel = styled.div`\n  padding: 0.9em;\n  background-color: ${({ theme }) => transparentize(0.6, theme.rightPanel.backgroundColor)};\n  margin: 0 0 10px 0;\n  display: block;\n  font-family: ${({ theme }) => theme.typography.headings.fontFamily};\n  font-size: 0.929em;\n  line-height: 1.5em;\n`;\n\nexport const DropdownLabel = styled.span`\n  font-family: ${({ theme }) => theme.typography.headings.fontFamily};\n  font-size: 12px;\n  position: absolute;\n  z-index: 1;\n  top: -11px;\n  left: 12px;\n  font-weight: ${({ theme }) => theme.typography.fontWeightBold};\n  color: ${({ theme }) => transparentize(0.3, theme.rightPanel.textColor)};\n`;\n\nexport const DropdownWrapper = styled.div`\n  position: relative;\n`;\n\nexport const InvertedSimpleDropdown = styled(Dropdown)`\n  label {\n    color: ${({ theme }) => theme.rightPanel.textColor};\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    overflow: hidden;\n    font-size: 1em;\n    text-transform: none;\n    border: none;\n  }\n  margin: 0 0 10px 0;\n  display: block;\n  background-color: ${({ theme }) => transparentize(0.6, theme.rightPanel.backgroundColor)};\n  border: none;\n  padding: 0.9em 1.6em 0.9em 0.9em;\n  box-shadow: none;\n  &:hover,\n  &:focus-within {\n    border: none;\n    box-shadow: none;\n    background-color: ${({ theme }) => transparentize(0.3, theme.rightPanel.backgroundColor)};\n  }\n`;\n\nexport const NoSampleLabel = styled.div`\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  font-size: 12px;\n  color: #ee807f;\n`;\n"
  },
  {
    "path": "src/components/Redoc/Redoc.tsx",
    "content": "import * as PropTypes from 'prop-types';\nimport * as React from 'react';\n\nimport { ThemeProvider } from '../../styled-components';\nimport { OptionsProvider } from '../OptionsProvider';\n\nimport { AppStore } from '../../services';\nimport { ApiInfo } from '../ApiInfo/';\nimport { ApiLogo } from '../ApiLogo/ApiLogo';\nimport { ContentItems } from '../ContentItems/ContentItems';\nimport { SideMenu } from '../SideMenu/SideMenu';\nimport { StickyResponsiveSidebar } from '../StickySidebar/StickyResponsiveSidebar';\nimport { ApiContentWrap, BackgroundStub, RedocWrap } from './styled.elements';\n\nimport { SearchBox } from '../SearchBox/SearchBox';\nimport { StoreProvider } from '../StoreBuilder';\n\nexport interface RedocProps {\n  store: AppStore;\n}\n\nexport class Redoc extends React.Component<RedocProps> {\n  static propTypes = {\n    store: PropTypes.instanceOf(AppStore).isRequired,\n  };\n\n  componentDidMount() {\n    this.props.store.onDidMount();\n  }\n\n  componentWillUnmount() {\n    this.props.store.dispose();\n  }\n\n  render() {\n    const {\n      store: { spec, menu, options, search, marker },\n    } = this.props;\n    const store = this.props.store;\n    return (\n      <ThemeProvider theme={options.theme}>\n        <StoreProvider value={store}>\n          <OptionsProvider value={options}>\n            <RedocWrap className=\"redoc-wrap\">\n              <StickyResponsiveSidebar menu={menu} className=\"menu-content\">\n                <ApiLogo info={spec.info} />\n                {(!options.disableSearch && (\n                  <SearchBox\n                    search={search!}\n                    marker={marker}\n                    getItemById={menu.getItemById}\n                    onActivate={menu.activateAndScroll}\n                  />\n                )) ||\n                  null}\n                <SideMenu menu={menu} />\n              </StickyResponsiveSidebar>\n              <ApiContentWrap className=\"api-content\">\n                <ApiInfo store={store} />\n                <ContentItems items={menu.items as any} />\n              </ApiContentWrap>\n              <BackgroundStub />\n            </RedocWrap>\n          </OptionsProvider>\n        </StoreProvider>\n      </ThemeProvider>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Redoc/styled.elements.tsx",
    "content": "import styled, { media } from '../../styled-components';\n\nexport const RedocWrap = styled.div`\n  ${({ theme }) => `\n  font-family: ${theme.typography.fontFamily};\n  font-size: ${theme.typography.fontSize};\n  font-weight: ${theme.typography.fontWeightRegular};\n  line-height: ${theme.typography.lineHeight};\n  color: ${theme.colors.text.primary};\n  display: flex;\n  position: relative;\n  text-align: left;\n\n  -webkit-font-smoothing: ${theme.typography.smoothing};\n  font-smoothing: ${theme.typography.smoothing};\n  ${(theme.typography.optimizeSpeed && 'text-rendering: optimizeSpeed !important') || ''};\n\n  tap-highlight-color: rgba(0, 0, 0, 0);\n  text-size-adjust: 100%;\n\n  * {\n    box-sizing: border-box;\n    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);\n  }\n`};\n`;\n\nexport const ApiContentWrap = styled.div`\n  z-index: 1;\n  position: relative;\n  overflow: hidden;\n  width: calc(100% - ${props => props.theme.sidebar.width});\n  ${media.lessThan('small', true)`\n    width: 100%;\n  `};\n\n  contain: layout;\n`;\n\nexport const BackgroundStub = styled.div`\n  background: ${({ theme }) => theme.rightPanel.backgroundColor};\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  width: ${({ theme }) => {\n    if (theme.rightPanel.width.endsWith('%')) {\n      const percents = parseInt(theme.rightPanel.width, 10);\n      return `calc((100% - ${theme.sidebar.width}) * ${percents / 100})`;\n    } else {\n      return theme.rightPanel.width;\n    }\n  }};\n  ${media.lessThan('medium', true)`\n    display: none;\n  `};\n`;\n"
  },
  {
    "path": "src/components/RedocStandalone.tsx",
    "content": "import * as React from 'react';\n\nimport {\n  argValueToBoolean,\n  RedocNormalizedOptions,\n  RedocRawOptions,\n} from '../services/RedocNormalizedOptions';\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { Loading } from './Loading/Loading';\nimport { Redoc } from './Redoc/Redoc';\nimport { StoreBuilder } from './StoreBuilder';\n\nexport interface RedocStandaloneProps {\n  spec?: object;\n  specUrl?: string;\n  options?: RedocRawOptions;\n  onLoaded?: (e?: Error) => any;\n}\n\ndeclare let __webpack_nonce__: string;\n\nexport const RedocStandalone = function (props: RedocStandaloneProps) {\n  const { spec, specUrl, options = {}, onLoaded } = props;\n  const hideLoading = argValueToBoolean(options.hideLoading, false);\n\n  const normalizedOpts = new RedocNormalizedOptions(options);\n\n  if (normalizedOpts.nonce !== undefined) {\n    try {\n      // eslint-disable-next-line  @typescript-eslint/no-unused-vars\n      __webpack_nonce__ = normalizedOpts.nonce;\n    } catch {} // If we have exception, Webpack was not used to run this.\n  }\n\n  return (\n    <ErrorBoundary>\n      <StoreBuilder\n        spec={spec ? { ...spec } : undefined}\n        specUrl={specUrl}\n        options={options}\n        onLoaded={onLoaded}\n      >\n        {({ loading, store }) =>\n          !loading ? (\n            <Redoc store={store!} />\n          ) : hideLoading ? null : (\n            <Loading color={normalizedOpts.theme.colors.primary.main} />\n          )\n        }\n      </StoreBuilder>\n    </ErrorBoundary>\n  );\n};\n"
  },
  {
    "path": "src/components/RequestSamples/RequestSamples.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { isPayloadSample, OperationModel, RedocNormalizedOptions } from '../../services';\nimport { PayloadSamples } from '../PayloadSamples/PayloadSamples';\nimport { SourceCodeWithCopy } from '../SourceCode/SourceCode';\n\nimport { RightPanelHeader, Tab, TabList, TabPanel, Tabs } from '../../common-elements';\nimport { OptionsContext } from '../OptionsProvider';\nimport { l } from '../../services/Labels';\n\nexport interface RequestSamplesProps {\n  operation: OperationModel;\n}\n\n@observer\nexport class RequestSamples extends React.Component<RequestSamplesProps> {\n  static contextType = OptionsContext;\n  context: RedocNormalizedOptions;\n  operation: OperationModel;\n\n  render() {\n    const { operation } = this.props;\n    const samples = operation.codeSamples;\n\n    const hasSamples = samples.length > 0;\n    const hideTabList = samples.length === 1 ? this.context.hideSingleRequestSampleTab : false;\n    return (\n      (hasSamples && (\n        <div>\n          <RightPanelHeader> {l('requestSamples')} </RightPanelHeader>\n\n          <Tabs defaultIndex={0}>\n            <TabList hidden={hideTabList}>\n              {samples.map(sample => (\n                <Tab key={sample.lang + '_' + (sample.label || '')}>\n                  {sample.label !== undefined ? sample.label : sample.lang}\n                </Tab>\n              ))}\n            </TabList>\n            {samples.map(sample => (\n              <TabPanel key={sample.lang + '_' + (sample.label || '')}>\n                {isPayloadSample(sample) ? (\n                  <div>\n                    <PayloadSamples content={sample.requestBodyContent} />\n                  </div>\n                ) : (\n                  <SourceCodeWithCopy lang={sample.lang} source={sample.source} />\n                )}\n              </TabPanel>\n            ))}\n          </Tabs>\n        </div>\n      )) ||\n      null\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/ResponseSamples/ResponseSamples.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { OperationModel } from '../../services/models';\n\nimport { RightPanelHeader, Tab, TabList, TabPanel, Tabs } from '../../common-elements';\nimport { PayloadSamples } from '../PayloadSamples/PayloadSamples';\nimport { l } from '../../services/Labels';\n\nexport interface ResponseSamplesProps {\n  operation: OperationModel;\n}\n\n@observer\nexport class ResponseSamples extends React.Component<ResponseSamplesProps> {\n  operation: OperationModel;\n\n  render() {\n    const { operation } = this.props;\n    const responses = operation.responses.filter(response => {\n      return response.content && response.content.hasSample;\n    });\n\n    return (\n      (responses.length > 0 && (\n        <div>\n          <RightPanelHeader> {l('responseSamples')} </RightPanelHeader>\n\n          <Tabs defaultIndex={0}>\n            <TabList>\n              {responses.map(response => (\n                <Tab className={'tab-' + response.type} key={response.code}>\n                  {response.code}\n                </Tab>\n              ))}\n            </TabList>\n            {responses.map(response => (\n              <TabPanel key={response.code}>\n                <div>\n                  <PayloadSamples content={response.content!} />\n                </div>\n              </TabPanel>\n            ))}\n          </Tabs>\n        </div>\n      )) ||\n      null\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Responses/Response.tsx",
    "content": "import * as React from 'react';\nimport { observer } from 'mobx-react';\n\nimport type { ResponseModel, MediaTypeModel } from '../../services/models';\nimport { ResponseDetails } from './ResponseDetails';\nimport { ResponseDetailsWrap, StyledResponseTitle } from './styled.elements';\n\nexport interface ResponseViewProps {\n  response: ResponseModel;\n}\n\nexport const ResponseView = observer(({ response }: ResponseViewProps): React.ReactElement => {\n  const { extensions, headers, type, summary, description, code, expanded, content } = response;\n\n  const mimes = React.useMemo<MediaTypeModel[]>(\n    () =>\n      content === undefined ? [] : content.mediaTypes.filter(mime => mime.schema !== undefined),\n    [content],\n  );\n\n  const empty = React.useMemo<boolean>(\n    () =>\n      (!extensions || Object.keys(extensions).length === 0) &&\n      headers.length === 0 &&\n      mimes.length === 0 &&\n      !description,\n    [extensions, headers, mimes, description],\n  );\n\n  return (\n    <div>\n      <StyledResponseTitle\n        onClick={() => response.toggle()}\n        type={type}\n        empty={empty}\n        title={summary || ''}\n        code={code}\n        opened={expanded}\n      />\n      {expanded && !empty && (\n        <ResponseDetailsWrap>\n          <ResponseDetails response={response} />\n        </ResponseDetailsWrap>\n      )}\n    </div>\n  );\n});\n"
  },
  {
    "path": "src/components/Responses/ResponseDetails.tsx",
    "content": "import * as React from 'react';\n\nimport { ResponseModel } from '../../services/models';\n\nimport { UnderlinedHeader } from '../../common-elements';\nimport { DropdownOrLabel } from '../DropdownOrLabel/DropdownOrLabel';\nimport { MediaTypesSwitch } from '../MediaTypeSwitch/MediaTypesSwitch';\nimport { Schema } from '../Schema';\n\nimport { Extensions } from '../Fields/Extensions';\nimport { Markdown } from '../Markdown/Markdown';\nimport { ResponseHeaders } from './ResponseHeaders';\nimport { ConstraintsView } from '../Fields/FieldConstraints';\n\nexport class ResponseDetails extends React.PureComponent<{ response: ResponseModel }> {\n  render() {\n    const { description, extensions, headers, content } = this.props.response;\n    return (\n      <>\n        {description && <Markdown source={description} />}\n        <Extensions extensions={extensions} />\n        <ResponseHeaders headers={headers} />\n        <MediaTypesSwitch content={content} renderDropdown={this.renderDropdown}>\n          {({ schema }) => {\n            return (\n              <>\n                {schema?.type === 'object' && (\n                  <ConstraintsView constraints={schema?.constraints || []} />\n                )}\n                <Schema skipWriteOnly={true} key=\"schema\" schema={schema} />\n              </>\n            );\n          }}\n        </MediaTypesSwitch>\n      </>\n    );\n  }\n\n  private renderDropdown = props => {\n    return (\n      <UnderlinedHeader key=\"header\">\n        Response Schema: <DropdownOrLabel {...props} />\n      </UnderlinedHeader>\n    );\n  };\n}\n"
  },
  {
    "path": "src/components/Responses/ResponseHeaders.tsx",
    "content": "import * as React from 'react';\nimport { PropertiesTable } from '../../common-elements/fields-layout';\n\nimport { FieldModel } from '../../services/models';\nimport { mapWithLast } from '../../utils';\nimport { Field } from '../Fields/Field';\nimport { HeadersCaption } from './styled.elements';\n\nexport interface ResponseHeadersProps {\n  headers?: FieldModel[];\n}\n\nexport class ResponseHeaders extends React.PureComponent<ResponseHeadersProps> {\n  render() {\n    const { headers } = this.props;\n    if (headers === undefined || headers.length === 0) {\n      return null;\n    }\n    return (\n      <PropertiesTable>\n        <HeadersCaption> Response Headers </HeadersCaption>\n        <tbody>\n          {mapWithLast(headers, (header, isLast) => (\n            <Field isLast={isLast} key={header.name} field={header} showExamples={true} />\n          ))}\n        </tbody>\n      </PropertiesTable>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Responses/ResponseTitle.tsx",
    "content": "import * as React from 'react';\n\nimport { Code } from './styled.elements';\nimport { ShelfIcon } from '../../common-elements';\nimport { Markdown } from '../Markdown/Markdown';\n\nexport interface ResponseTitleProps {\n  code: string;\n  title: string;\n  type: string;\n  empty?: boolean;\n  opened?: boolean;\n  className?: string;\n  onClick?: () => void;\n}\n\nfunction ResponseTitleComponent({\n  title,\n  type,\n  empty,\n  code,\n  opened,\n  className,\n  onClick,\n}: ResponseTitleProps): React.ReactElement {\n  return (\n    <button\n      className={className}\n      onClick={(!empty && onClick) || undefined}\n      aria-expanded={opened}\n      disabled={empty}\n    >\n      {!empty && (\n        <ShelfIcon\n          size={'1.5em'}\n          color={type}\n          direction={opened ? 'down' : 'right'}\n          float={'left'}\n        />\n      )}\n      <Code>{code} </Code>\n      <Markdown compact={true} inline={true} source={title} />\n    </button>\n  );\n}\n\nexport const ResponseTitle = React.memo<ResponseTitleProps>(ResponseTitleComponent);\n"
  },
  {
    "path": "src/components/Responses/ResponsesList.tsx",
    "content": "import * as React from 'react';\nimport { l } from '../../services/Labels';\nimport { ResponseModel } from '../../services/models';\nimport styled from '../../styled-components';\nimport { ResponseView } from './Response';\n\nconst ResponsesHeader = styled.h3`\n  font-size: 1.3em;\n  padding: 0.2em 0;\n  margin: 3em 0 1.1em;\n  color: ${({ theme }) => theme.colors.text.primary};\n  font-weight: normal;\n`;\n\nexport interface ResponseListProps {\n  responses: ResponseModel[];\n  isCallback?: boolean;\n}\n\nexport class ResponsesList extends React.PureComponent<ResponseListProps> {\n  render() {\n    const { responses, isCallback } = this.props;\n\n    if (!responses || responses.length === 0) {\n      return null;\n    }\n\n    return (\n      <div>\n        <ResponsesHeader>{isCallback ? l('callbackResponses') : l('responses')}</ResponsesHeader>\n        {responses.map(response => {\n          return <ResponseView key={response.code} response={response} />;\n        })}\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Responses/styled.elements.ts",
    "content": "import { UnderlinedHeader } from '../../common-elements';\nimport styled from '../../styled-components';\nimport { ResponseTitle } from './ResponseTitle';\n\nexport const StyledResponseTitle = styled(ResponseTitle)`\n  display: block;\n  border: 0;\n  width: 100%;\n  text-align: left;\n  padding: 10px;\n  border-radius: 2px;\n  margin-bottom: 4px;\n  line-height: 1.5em;\n  cursor: pointer;\n\n  color: ${props => props.theme.colors.responses[props.type].color};\n  background-color: ${props => props.theme.colors.responses[props.type].backgroundColor};\n  &:focus {\n    outline: auto ${props => props.theme.colors.responses[props.type].color};\n  }\n  ${props =>\n    (props.empty &&\n      `\ncursor: default;\n&::before {\n  content: \"—\";\n  font-weight: bold;\n  width: 1.5em;\n  text-align: center;\n  display: inline-block;\n  vertical-align: top;\n}\n&:focus {\n  outline: 0;\n}\n`) ||\n    ''};\n`;\n\nexport const ResponseDetailsWrap = styled.div`\n  padding: 10px;\n`;\n\nexport const HeadersCaption = styled(UnderlinedHeader).attrs({\n  as: 'caption',\n})`\n  text-align: left;\n  margin-top: 1em;\n  caption-side: top;\n`;\n\nexport const Code = styled.strong`\n  vertical-align: top;\n`;\n"
  },
  {
    "path": "src/components/Schema/ArraySchema.tsx",
    "content": "import * as React from 'react';\n\nimport { Schema, SchemaProps } from './Schema';\n\nimport { ArrayClosingLabel, ArrayOpenningLabel } from '../../common-elements';\nimport styled from '../../styled-components';\nimport { humanizeConstraints } from '../../utils';\nimport { TypeName } from '../../common-elements/fields';\nimport { ObjectSchema } from './ObjectSchema';\n\nconst PaddedSchema = styled.div`\n  padding-left: ${({ theme }) => theme.spacing.unit * 2}px;\n`;\n\nexport class ArraySchema extends React.PureComponent<SchemaProps> {\n  render() {\n    const schema = this.props.schema;\n    const itemsSchema = schema.items;\n    const fieldParentsName = this.props.fieldParentsName;\n\n    const minMaxItems =\n      schema.minItems === undefined && schema.maxItems === undefined\n        ? ''\n        : `(${humanizeConstraints(schema)})`;\n\n    const updatedParentsArray = fieldParentsName\n      ? [...fieldParentsName.slice(0, -1), fieldParentsName[fieldParentsName.length - 1] + '[]']\n      : fieldParentsName;\n    if (schema.fields) {\n      return (\n        <ObjectSchema\n          {...(this.props as any)}\n          level={this.props.level}\n          fieldParentsName={updatedParentsArray}\n        />\n      );\n    }\n    if (schema.displayType && !itemsSchema && !minMaxItems.length) {\n      return (\n        <div>\n          <TypeName>{schema.displayType}</TypeName>\n        </div>\n      );\n    }\n\n    return (\n      <div>\n        <ArrayOpenningLabel> Array {minMaxItems}</ArrayOpenningLabel>\n        <PaddedSchema>\n          <Schema {...this.props} schema={itemsSchema} fieldParentsName={updatedParentsArray} />\n        </PaddedSchema>\n        <ArrayClosingLabel />\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Schema/DiscriminatorDropdown.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { DropdownOption, Dropdown } from '../../common-elements/Dropdown';\nimport { SchemaModel } from '../../services/models';\n\n@observer\nexport class DiscriminatorDropdown extends React.Component<{\n  parent: SchemaModel;\n  enumValues: string[];\n}> {\n  sortOptions(options: DropdownOption[], enumValues: string[]): void {\n    if (enumValues.length === 0) {\n      return;\n    }\n\n    const enumOrder = {};\n\n    enumValues.forEach((enumItem, idx) => {\n      enumOrder[enumItem] = idx;\n    });\n\n    options.sort((a, b) => {\n      return enumOrder[a.value] > enumOrder[b.value] ? 1 : -1;\n    });\n  }\n\n  render() {\n    const { parent, enumValues } = this.props;\n    if (parent.oneOf === undefined) {\n      return null;\n    }\n\n    const options = parent.oneOf.map((subSchema, idx) => {\n      return {\n        value: subSchema.title,\n        idx,\n      };\n    });\n\n    const activeValue = options[parent.activeOneOf].value;\n\n    this.sortOptions(options, enumValues);\n\n    return (\n      <Dropdown\n        value={activeValue}\n        options={options}\n        onChange={this.changeActiveChild}\n        ariaLabel=\"Example\"\n      />\n    );\n  }\n\n  changeActiveChild = (option: DropdownOption) => {\n    if (option.idx !== undefined) {\n      this.props.parent.activateOneOf(option.idx);\n    }\n  };\n}\n"
  },
  {
    "path": "src/components/Schema/ObjectSchema.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { SchemaModel } from '../../services/models';\n\nimport { PropertiesTable, PropertiesTableCaption } from '../../common-elements/fields-layout';\nimport { Field } from '../Fields/Field';\nimport { DiscriminatorDropdown } from './DiscriminatorDropdown';\nimport { SchemaProps } from './Schema';\n\nimport { mapWithLast } from '../../utils';\nimport { OptionsContext } from '../OptionsProvider';\n\nexport interface ObjectSchemaProps extends SchemaProps {\n  discriminator?: {\n    fieldName: string;\n    parentSchema: SchemaModel;\n  };\n  fieldParentsName?: string[];\n}\n\nexport const ObjectSchema = observer(\n  ({\n    schema: { fields = [], title },\n    showTitle,\n    discriminator,\n    skipReadOnly,\n    skipWriteOnly,\n    level,\n    fieldParentsName,\n  }: ObjectSchemaProps) => {\n    const { expandSingleSchemaField, showObjectSchemaExamples, schemasExpansionLevel } =\n      React.useContext(OptionsContext);\n\n    const filteredFields = React.useMemo(\n      () =>\n        skipReadOnly || skipWriteOnly\n          ? fields.filter(\n              item =>\n                !(\n                  (skipReadOnly && item.schema.readOnly) ||\n                  (skipWriteOnly && item.schema.writeOnly)\n                ),\n            )\n          : fields,\n      [skipReadOnly, skipWriteOnly, fields],\n    );\n\n    const expandByDefault =\n      (expandSingleSchemaField && filteredFields.length === 1) || schemasExpansionLevel >= level!;\n\n    return (\n      <PropertiesTable>\n        {showTitle && <PropertiesTableCaption>{title}</PropertiesTableCaption>}\n        <tbody>\n          {mapWithLast(filteredFields, (field, isLast) => {\n            return (\n              <Field\n                key={field.name}\n                isLast={isLast}\n                field={field}\n                expandByDefault={expandByDefault}\n                fieldParentsName={Number(level) > 1 ? fieldParentsName : []}\n                renderDiscriminatorSwitch={\n                  discriminator?.fieldName === field.name\n                    ? () => (\n                        <DiscriminatorDropdown\n                          parent={discriminator!.parentSchema}\n                          enumValues={field.schema.enum}\n                        />\n                      )\n                    : undefined\n                }\n                className={field.expanded ? 'expanded' : undefined}\n                showExamples={showObjectSchemaExamples}\n                skipReadOnly={skipReadOnly}\n                skipWriteOnly={skipWriteOnly}\n                showTitle={showTitle}\n                level={level}\n              />\n            );\n          })}\n        </tbody>\n      </PropertiesTable>\n    );\n  },\n);\n"
  },
  {
    "path": "src/components/Schema/OneOfSchema.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n  OneOfButton as StyledOneOfButton,\n  OneOfLabel,\n  OneOfList,\n} from '../../common-elements/schema';\nimport { Badge } from '../../common-elements/shelfs';\nimport { SchemaModel } from '../../services/models';\nimport { ConstraintsView } from '../Fields/FieldConstraints';\nimport { Schema, SchemaProps } from './Schema';\n\nexport interface OneOfButtonProps {\n  subSchema: SchemaModel;\n  idx: number;\n  schema: SchemaModel;\n}\n\n@observer\nexport class OneOfButton extends React.Component<OneOfButtonProps> {\n  render() {\n    const { idx, schema, subSchema } = this.props;\n    return (\n      <StyledOneOfButton\n        $deprecated={subSchema.deprecated}\n        $active={idx === schema.activeOneOf}\n        onClick={this.activateOneOf}\n      >\n        {subSchema.title || subSchema.typePrefix + subSchema.displayType}\n      </StyledOneOfButton>\n    );\n  }\n\n  activateOneOf = () => {\n    this.props.schema.activateOneOf(this.props.idx);\n  };\n}\n\n@observer\nexport class OneOfSchema extends React.Component<SchemaProps> {\n  render() {\n    const {\n      schema: { oneOf },\n      schema,\n    } = this.props;\n\n    if (oneOf === undefined) {\n      return null;\n    }\n    const activeSchema = oneOf[schema.activeOneOf];\n\n    return (\n      <div>\n        <OneOfLabel> {schema.oneOfType} </OneOfLabel>\n        <OneOfList>\n          {oneOf.map((subSchema, idx) => (\n            <OneOfButton key={subSchema.pointer} schema={schema} subSchema={subSchema} idx={idx} />\n          ))}\n        </OneOfList>\n        <div>\n          {oneOf[schema.activeOneOf].deprecated && <Badge type=\"warning\">Deprecated</Badge>}\n        </div>\n        <ConstraintsView constraints={activeSchema.constraints} />\n        <Schema {...this.props} schema={activeSchema} />\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Schema/RecursiveSchema.tsx",
    "content": "import * as React from 'react';\nimport { observer } from 'mobx-react';\n\nimport { RecursiveLabel, TypeName, TypeTitle } from '../../common-elements/fields';\nimport { l } from '../../services/Labels';\nimport type { SchemaProps } from '.';\n\nexport const RecursiveSchema = observer(({ schema }: SchemaProps) => {\n  return (\n    <div>\n      <TypeName>{schema.displayType}</TypeName>\n      {schema.title && <TypeTitle> {schema.title} </TypeTitle>}\n      <RecursiveLabel> {l('recursive')} </RecursiveLabel>\n    </div>\n  );\n});\n"
  },
  {
    "path": "src/components/Schema/Schema.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { FieldDetails } from '../Fields/FieldDetails';\n\nimport { FieldModel, SchemaModel } from '../../services/models';\n\nimport { ArraySchema } from './ArraySchema';\nimport { ObjectSchema } from './ObjectSchema';\nimport { OneOfSchema } from './OneOfSchema';\nimport { RecursiveSchema } from './RecursiveSchema';\n\nimport { isArray } from '../../utils/helpers';\n\nexport interface SchemaOptions {\n  showTitle?: boolean;\n  skipReadOnly?: boolean;\n  skipWriteOnly?: boolean;\n  level?: number;\n}\n\nexport interface SchemaProps extends SchemaOptions {\n  schema: SchemaModel;\n  fieldParentsName?: string[];\n}\n\n@observer\nexport class Schema extends React.Component<Partial<SchemaProps>> {\n  render() {\n    const { schema, ...rest } = this.props;\n    const level = (rest.level || 0) + 1;\n\n    if (!schema) {\n      return <em> Schema not provided </em>;\n    }\n    const { type, oneOf, discriminatorProp, isCircular } = schema;\n\n    if (isCircular) {\n      return <RecursiveSchema schema={schema} />;\n    }\n\n    if (discriminatorProp !== undefined) {\n      if (!oneOf || !oneOf.length) {\n        console.warn(\n          `Looks like you are using discriminator wrong: you don't have any definition inherited from the ${schema.title}`,\n        );\n        return null;\n      }\n      const activeSchema = oneOf[schema.activeOneOf];\n      return activeSchema.isCircular ? (\n        <RecursiveSchema schema={activeSchema} />\n      ) : (\n        <ObjectSchema\n          {...rest}\n          level={level}\n          schema={activeSchema}\n          discriminator={{\n            fieldName: discriminatorProp,\n            parentSchema: schema,\n          }}\n        />\n      );\n    }\n\n    if (oneOf !== undefined) {\n      return <OneOfSchema schema={schema} {...rest} />;\n    }\n\n    const types = isArray(type) ? type : [type];\n    if (types.includes('object')) {\n      if (schema.fields?.length) {\n        return <ObjectSchema {...(this.props as any)} level={level} />;\n      }\n    } else if (types.includes('array')) {\n      return <ArraySchema {...(this.props as any)} level={level} />;\n    }\n\n    // TODO: maybe adjust FieldDetails to accept schema\n    const field = {\n      schema,\n      name: '',\n      required: false,\n      description: schema.description,\n      externalDocs: schema.externalDocs,\n      deprecated: false,\n      toggle: () => null,\n      expanded: false,\n    } as any as FieldModel; // cast needed for hot-loader to not fail\n\n    return (\n      <div>\n        <FieldDetails field={field} />\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/Schema/index.ts",
    "content": "export * from './Schema';\nexport * from './ObjectSchema';\nexport * from './OneOfSchema';\nexport * from './ArraySchema';\nexport * from './DiscriminatorDropdown';\n"
  },
  {
    "path": "src/components/SchemaDefinition/SchemaDefinition.tsx",
    "content": "import * as React from 'react';\n\nimport { DarkRightPanel, MiddlePanel, MimeLabel, Row, Section } from '../../common-elements';\nimport { MediaTypeModel, OpenAPIParser, RedocNormalizedOptions } from '../../services';\nimport styled from '../../styled-components';\nimport { OpenAPIMediaType } from '../../types';\nimport { DropdownOrLabel } from '../DropdownOrLabel/DropdownOrLabel';\nimport { MediaTypeSamples } from '../PayloadSamples/MediaTypeSamples';\nimport { InvertedSimpleDropdown } from '../PayloadSamples/styled.elements';\nimport { Schema } from '../Schema';\n\nexport interface ObjectDescriptionProps {\n  schemaRef: string;\n  exampleRef?: string;\n  showReadOnly?: boolean;\n  showWriteOnly?: boolean;\n  showExample?: boolean;\n  parser: OpenAPIParser;\n  options: RedocNormalizedOptions;\n}\n\nexport class SchemaDefinition extends React.PureComponent<ObjectDescriptionProps> {\n  private static getMediaType(schemaRef: string, exampleRef?: string): OpenAPIMediaType {\n    if (!schemaRef) {\n      return {};\n    }\n\n    const info: OpenAPIMediaType = {\n      schema: { $ref: schemaRef },\n    };\n\n    if (exampleRef) {\n      info.examples = { example: { $ref: exampleRef } };\n    }\n\n    return info;\n  }\n\n  private _mediaModel: MediaTypeModel;\n\n  private get mediaModel() {\n    const { parser, schemaRef, exampleRef, options } = this.props;\n    if (!this._mediaModel) {\n      this._mediaModel = new MediaTypeModel(\n        parser,\n        'json',\n        false,\n        SchemaDefinition.getMediaType(schemaRef, exampleRef),\n        options,\n      );\n    }\n\n    return this._mediaModel;\n  }\n\n  render() {\n    const { showReadOnly = true, showWriteOnly = false, showExample = true } = this.props;\n    return (\n      <Section>\n        <Row>\n          <MiddlePanel>\n            <Schema\n              skipWriteOnly={!showWriteOnly}\n              skipReadOnly={!showReadOnly}\n              schema={this.mediaModel.schema}\n            />\n          </MiddlePanel>\n          {showExample && (\n            <DarkRightPanel>\n              <MediaSamplesWrap>\n                <MediaTypeSamples\n                  renderDropdown={this.renderDropdown}\n                  mediaType={this.mediaModel}\n                />\n              </MediaSamplesWrap>\n            </DarkRightPanel>\n          )}\n        </Row>\n      </Section>\n    );\n  }\n\n  private renderDropdown = props => {\n    return (\n      <DropdownOrLabel\n        Label={MimeLabel}\n        Dropdown={InvertedSimpleDropdown}\n        {...props}\n        variant=\"dark\"\n      />\n    );\n  };\n}\n\nconst MediaSamplesWrap = styled.div`\n  background: ${({ theme }) => theme.codeBlock.backgroundColor};\n  & > div,\n  & > pre {\n    padding: ${props => props.theme.spacing.unit * 4}px;\n    margin: 0;\n  }\n\n  & > div > pre {\n    padding: 0;\n  }\n`;\n"
  },
  {
    "path": "src/components/SearchBox/SearchBox.tsx",
    "content": "import * as React from 'react';\n\nimport type { IMenuItem, SearchResult } from '../../services/types';\nimport type { SearchStore } from '../../services/SearchStore';\nimport type { MarkerService } from '../../services/MarkerService';\n\nimport { MenuItem } from '../SideMenu/MenuItem';\nimport { OptionsContext } from '../OptionsProvider';\nimport { bind, debounce } from 'decko';\nimport { PerfectScrollbarWrap } from '../../common-elements/perfect-scrollbar';\nimport {\n  ClearIcon,\n  SearchIcon,\n  SearchInput,\n  SearchResultsBox,\n  SearchWrap,\n} from './styled.elements';\nimport { l } from '../../services/Labels';\n\nexport interface SearchBoxProps {\n  search: SearchStore<string>;\n  marker: MarkerService;\n  getItemById: (id: string) => IMenuItem | undefined;\n  onActivate: (item: IMenuItem) => void;\n\n  className?: string;\n}\n\nexport interface SearchBoxState {\n  results: SearchResult[];\n  noResults: boolean;\n  term: string;\n  activeItemIdx: number;\n}\n\nexport class SearchBox extends React.PureComponent<SearchBoxProps, SearchBoxState> {\n  activeItemRef: MenuItem | null = null;\n\n  static contextType = OptionsContext;\n  declare context: React.ContextType<typeof OptionsContext>;\n\n  constructor(props) {\n    super(props);\n    this.state = {\n      results: [],\n      noResults: false,\n      term: '',\n      activeItemIdx: -1,\n    };\n  }\n\n  clearResults(term: string) {\n    this.setState({\n      results: [],\n      noResults: false,\n      term,\n    });\n    this.props.marker.unmark();\n  }\n\n  clear = () => {\n    this.setState({\n      results: [],\n      noResults: false,\n      term: '',\n      activeItemIdx: -1,\n    });\n    this.props.marker.unmark();\n  };\n\n  handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n    if (event.keyCode === 27) {\n      // ESQ\n      this.clear();\n    }\n    if (event.keyCode === 40) {\n      // Arrow down\n      this.setState({\n        activeItemIdx: Math.min(this.state.activeItemIdx + 1, this.state.results.length - 1),\n      });\n      event.preventDefault();\n    }\n    if (event.keyCode === 38) {\n      // Arrow up\n      this.setState({\n        activeItemIdx: Math.max(0, this.state.activeItemIdx - 1),\n      });\n      event.preventDefault();\n    }\n    if (event.keyCode === 13) {\n      // enter\n      const activeResult = this.state.results[this.state.activeItemIdx];\n      if (activeResult) {\n        const item = this.props.getItemById(activeResult.meta);\n        if (item) {\n          this.props.onActivate(item);\n        }\n      }\n    }\n  };\n\n  setResults(results: SearchResult[], term: string) {\n    this.setState({\n      results,\n      noResults: results.length === 0,\n    });\n    this.props.marker.mark(term);\n  }\n\n  @bind\n  @debounce(400)\n  searchCallback(searchTerm: string) {\n    this.props.search.search(searchTerm).then(res => {\n      this.setResults(res, searchTerm);\n    });\n  }\n\n  search = (event: React.ChangeEvent<HTMLInputElement>) => {\n    const { minCharacterLengthToInitSearch } = this.context;\n    const q = event.target.value;\n    if (q.length < minCharacterLengthToInitSearch) {\n      this.clearResults(q);\n      return;\n    }\n\n    this.setState(\n      {\n        term: q,\n      },\n      () => this.searchCallback(this.state.term),\n    );\n  };\n\n  render() {\n    const { activeItemIdx } = this.state;\n    const results = this.state.results\n      .filter(res => this.props.getItemById(res.meta))\n      .map(res => ({\n        item: this.props.getItemById(res.meta)!,\n        score: res.score,\n      }))\n      .sort((a, b) => b.score - a.score);\n\n    return (\n      <SearchWrap role=\"search\">\n        {this.state.term && <ClearIcon onClick={this.clear}>×</ClearIcon>}\n        <SearchIcon />\n        <SearchInput\n          value={this.state.term}\n          onKeyDown={this.handleKeyDown}\n          placeholder=\"Search...\"\n          aria-label=\"Search\"\n          type=\"text\"\n          onChange={this.search}\n        />\n        {results.length > 0 && (\n          <PerfectScrollbarWrap\n            options={{\n              wheelPropagation: false,\n            }}\n          >\n            <SearchResultsBox data-role=\"search:results\">\n              {results.map((res, idx) => (\n                <MenuItem\n                  item={Object.create(res.item, {\n                    active: {\n                      value: idx === activeItemIdx,\n                    },\n                  })}\n                  onActivate={this.props.onActivate}\n                  withoutChildren={true}\n                  key={res.item.id}\n                  data-role=\"search:result\"\n                />\n              ))}\n            </SearchResultsBox>\n          </PerfectScrollbarWrap>\n        )}\n        {this.state.term && this.state.noResults ? (\n          <SearchResultsBox data-role=\"search:results\">{l('noResultsFound')}</SearchResultsBox>\n        ) : null}\n      </SearchWrap>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/SearchBox/styled.elements.tsx",
    "content": "import * as React from 'react';\n\nimport { darken, getLuminance, lighten } from 'polished';\nimport styled from '../../styled-components';\nimport { MenuItemLabel } from '../SideMenu/styled.elements';\n\nexport const SearchWrap = styled.div`\n  padding: 5px 0;\n`;\n\nexport const SearchInput = styled.input.attrs(() => ({\n  className: 'search-input',\n}))`\n  width: calc(100% - ${props => props.theme.spacing.unit * 8}px);\n  box-sizing: border-box;\n  margin: 0 ${props => props.theme.spacing.unit * 4}px;\n  padding: 5px ${props => props.theme.spacing.unit * 2}px 5px\n    ${props => props.theme.spacing.unit * 4}px;\n  border: 0;\n  border-bottom: 1px solid\n    ${({ theme }) =>\n      (getLuminance(theme.sidebar.backgroundColor) > 0.5 ? darken : lighten)(\n        0.1,\n        theme.sidebar.backgroundColor,\n      )};\n  font-family: ${({ theme }) => theme.typography.fontFamily};\n  font-weight: bold;\n  font-size: 13px;\n  color: ${props => props.theme.sidebar.textColor};\n  background-color: transparent;\n  outline: none;\n`;\n\nexport const SearchIcon = styled((props: { className?: string }) => (\n  <svg\n    className={props.className}\n    version=\"1.1\"\n    viewBox=\"0 0 1000 1000\"\n    x=\"0px\"\n    xmlns=\"http://www.w3.org/2000/svg\"\n    y=\"0px\"\n  >\n    <path d=\"M968.2,849.4L667.3,549c83.9-136.5,66.7-317.4-51.7-435.6C477.1-25,252.5-25,113.9,113.4c-138.5,138.3-138.5,362.6,0,501C219.2,730.1,413.2,743,547.6,666.5l301.9,301.4c43.6,43.6,76.9,14.9,104.2-12.4C981,928.3,1011.8,893,968.2,849.4z M524.5,522c-88.9,88.7-233,88.7-321.8,0c-88.9-88.7-88.9-232.6,0-321.3c88.9-88.7,233-88.7,321.8,0C613.4,289.4,613.4,433.3,524.5,522z\" />\n  </svg>\n)).attrs({\n  className: 'search-icon',\n})`\n  position: absolute;\n  left: ${props => props.theme.spacing.unit * 4}px;\n  height: 1.8em;\n  width: 0.9em;\n\n  path {\n    fill: ${props => props.theme.sidebar.textColor};\n  }\n`;\n\nexport const SearchResultsBox = styled.div`\n  padding: ${props => props.theme.spacing.unit}px 0;\n  background-color: ${({ theme }) => darken(0.05, theme.sidebar.backgroundColor)}};\n  color: ${props => props.theme.sidebar.textColor};\n  min-height: 150px;\n  max-height: 250px;\n  border-top: ${({ theme }) => darken(0.1, theme.sidebar.backgroundColor)}};\n  border-bottom: ${({ theme }) => darken(0.1, theme.sidebar.backgroundColor)}};\n  margin-top: 10px;\n  line-height: 1.4;\n  font-size: 0.9em;\n  \n  li {\n    background-color: inherit;\n  }\n\n  ${MenuItemLabel} {\n    padding-top: 6px;\n    padding-bottom: 6px;\n\n    &:hover,\n    &.active {\n      background-color: ${({ theme }) => darken(0.1, theme.sidebar.backgroundColor)};\n    }\n\n    > svg {\n      display: none;\n    }\n  }\n`;\n\nexport const ClearIcon = styled.i`\n  position: absolute;\n  display: inline-block;\n  width: ${props => props.theme.spacing.unit * 2}px;\n  text-align: center;\n  right: ${props => props.theme.spacing.unit * 4}px;\n  line-height: 2em;\n  vertical-align: middle;\n  margin-right: 2px;\n  cursor: pointer;\n  font-style: normal;\n  color: '#666';\n`;\n"
  },
  {
    "path": "src/components/SecurityRequirement/OAuthFlow.tsx",
    "content": "import * as React from 'react';\nimport { OpenAPISecurityScheme } from '../../types';\nimport { SecurityRow } from './styled.elements';\nimport { SeeMore } from '../SeeMore/SeeMore';\nimport { Markdown } from '../Markdown/Markdown';\n\nexport interface OAuthFlowProps {\n  type: string;\n  flow: OpenAPISecurityScheme['flows'][keyof OpenAPISecurityScheme['flows']];\n  RequiredScopes?: JSX.Element;\n}\n\nexport function OAuthFlowComponent(props: OAuthFlowProps) {\n  const { type, flow, RequiredScopes } = props;\n  const scopesNames = Object.keys(flow?.scopes || {});\n\n  return (\n    <>\n      <SecurityRow>\n        <b>Flow type: </b>\n        <code>{type} </code>\n      </SecurityRow>\n      {(type === 'implicit' || type === 'authorizationCode') && (\n        <SecurityRow>\n          <strong> Authorization URL: </strong>\n          <code>\n            <a target=\"_blank\" rel=\"noopener noreferrer\" href={(flow as any).authorizationUrl}>\n              {(flow as any).authorizationUrl}\n            </a>\n          </code>\n        </SecurityRow>\n      )}\n      {(type === 'password' || type === 'clientCredentials' || type === 'authorizationCode') && (\n        <SecurityRow>\n          <b> Token URL: </b>\n          <code>{(flow as any).tokenUrl}</code>\n        </SecurityRow>\n      )}\n      {flow!.refreshUrl && (\n        <SecurityRow>\n          <strong> Refresh URL: </strong>\n          <code>{flow!.refreshUrl}</code>\n        </SecurityRow>\n      )}\n      {!!scopesNames.length && (\n        <>\n          {RequiredScopes || null}\n          <SecurityRow>\n            <b> Scopes: </b>\n          </SecurityRow>\n          <SeeMore height=\"4em\">\n            <ul>\n              {scopesNames.map(scope => (\n                <li key={scope}>\n                  <code>{scope}</code> -{' '}\n                  <Markdown\n                    className={'redoc-markdown'}\n                    inline={true}\n                    source={flow!.scopes[scope] || ''}\n                  />\n                </li>\n              ))}\n            </ul>\n          </SeeMore>\n        </>\n      )}\n    </>\n  );\n}\n\nexport const OAuthFlow = React.memo<OAuthFlowProps>(OAuthFlowComponent);\n"
  },
  {
    "path": "src/components/SecurityRequirement/RequiredScopesRow.tsx",
    "content": "import * as React from 'react';\n\nexport const RequiredScopesRow = ({ scopes }: { scopes: string[] }): JSX.Element | null => {\n  if (!scopes.length) return null;\n\n  return (\n    <div>\n      <b>Required scopes: </b>\n      {scopes.map((scope, idx) => {\n        return (\n          <React.Fragment key={idx}>\n            <code>{scope}</code>{' '}\n          </React.Fragment>\n        );\n      })}\n    </div>\n  );\n};\n"
  },
  {
    "path": "src/components/SecurityRequirement/SecurityDetails.tsx",
    "content": "import * as React from 'react';\nimport { SecuritySchemeModel } from '../../services';\nimport { titleize } from '../../utils';\nimport { StyledMarkdownBlock } from '../Markdown/styled.elements';\nimport { SecurityRow } from './styled.elements';\nimport { OAuthFlow } from './OAuthFlow';\n\ninterface SecuritySchemaProps {\n  RequiredScopes?: JSX.Element;\n  scheme: SecuritySchemeModel;\n}\nexport function SecurityDetails(props: SecuritySchemaProps) {\n  const { RequiredScopes, scheme } = props;\n\n  return (\n    <StyledMarkdownBlock>\n      {scheme.apiKey ? (\n        <>\n          <SecurityRow>\n            <b>{titleize(scheme.apiKey.in || '')} parameter name: </b>\n            <code>{scheme.apiKey.name}</code>\n          </SecurityRow>\n          {RequiredScopes}\n        </>\n      ) : scheme.http ? (\n        <>\n          <SecurityRow>\n            <b>HTTP Authorization Scheme: </b>\n            <code>{scheme.http.scheme}</code>\n          </SecurityRow>\n          <SecurityRow>\n            {scheme.http.scheme === 'bearer' && scheme.http.bearerFormat && (\n              <>\n                <b>Bearer format: </b>\n                <code>{scheme.http.bearerFormat}</code>\n              </>\n            )}\n          </SecurityRow>\n          {RequiredScopes}\n        </>\n      ) : scheme.openId ? (\n        <>\n          <SecurityRow>\n            <b>Connect URL: </b>\n            <code>\n              <a target=\"_blank\" rel=\"noopener noreferrer\" href={scheme.openId.connectUrl}>\n                {scheme.openId.connectUrl}\n              </a>\n            </code>\n          </SecurityRow>\n          {RequiredScopes}\n        </>\n      ) : scheme.flows ? (\n        Object.keys(scheme.flows).map(type => (\n          <OAuthFlow\n            key={type}\n            type={type}\n            RequiredScopes={RequiredScopes}\n            flow={scheme.flows[type]}\n          />\n        ))\n      ) : null}\n    </StyledMarkdownBlock>\n  );\n}\n"
  },
  {
    "path": "src/components/SecurityRequirement/SecurityHeader.tsx",
    "content": "import { SecurityRequirementModel } from '../../services/models/SecurityRequirement';\nimport {\n  ScopeName,\n  SecurityRequirementAndWrap,\n  SecurityRequirementOrWrap,\n} from './styled.elements';\nimport * as React from 'react';\nimport { AUTH_TYPES } from '../SecuritySchemes/SecuritySchemes';\n\nexport interface SecurityRequirementProps {\n  security: SecurityRequirementModel;\n  showSecuritySchemeType?: boolean;\n  expanded: boolean;\n}\n\nexport function SecurityHeader(props: SecurityRequirementProps) {\n  const { security, showSecuritySchemeType, expanded } = props;\n\n  const grouping = security.schemes.length > 1;\n  if (security.schemes.length === 0)\n    return <SecurityRequirementOrWrap $expanded={expanded}>None</SecurityRequirementOrWrap>;\n  return (\n    <SecurityRequirementOrWrap $expanded={expanded}>\n      {grouping && '('}\n      {security.schemes.map(scheme => {\n        return (\n          <SecurityRequirementAndWrap key={scheme.id}>\n            {showSecuritySchemeType && `${AUTH_TYPES[scheme.type] || scheme.type}: `}\n            <i>{scheme.displayName}</i>\n            {expanded && scheme.scopes.length\n              ? [\n                  ' (',\n                  scheme.scopes.map<React.ReactNode>(scope => (\n                    <ScopeName key={scope}>{scope}</ScopeName>\n                  )),\n                  ') ',\n                ]\n              : null}\n          </SecurityRequirementAndWrap>\n        );\n      })}\n      {grouping && ') '}\n    </SecurityRequirementOrWrap>\n  );\n}\n"
  },
  {
    "path": "src/components/SecurityRequirement/SecurityRequirement.tsx",
    "content": "import * as React from 'react';\nimport { useState } from 'react';\nimport { SecurityRequirementModel } from '../../services/models/SecurityRequirement';\nimport {\n  AuthHeader,\n  AuthHeaderColumn,\n  SecuritiesColumn,\n  SecurityDetailsStyle,\n  Wrap,\n} from './styled.elements';\nimport { useStore } from '../StoreBuilder';\nimport { SecurityHeader } from './SecurityHeader';\nimport { RequiredScopesRow } from './RequiredScopesRow';\nimport { AUTH_TYPES } from '../SecuritySchemes/SecuritySchemes';\nimport { Markdown } from '../Markdown/Markdown';\nimport { SecurityDetails } from './SecurityDetails';\nimport { ShelfIcon } from '../../common-elements';\n\nexport interface SecurityRequirementsProps {\n  securities: SecurityRequirementModel[];\n}\n\nexport function SecurityRequirements(props: SecurityRequirementsProps) {\n  const store = useStore();\n  const showSecuritySchemeType = store?.options.showSecuritySchemeType;\n  const [expanded, setExpanded] = useState(false);\n\n  const { securities } = props;\n\n  if (!securities?.length || store?.options.hideSecuritySection) {\n    return null;\n  }\n\n  const operationSecuritySchemes = store?.spec.securitySchemes.schemes.filter(({ id }) => {\n    return securities.find(security => security.schemes.find(scheme => scheme.id === id));\n  });\n\n  return (\n    <>\n      <Wrap $expanded={expanded}>\n        <AuthHeaderColumn onClick={() => setExpanded(!expanded)}>\n          <AuthHeader>Authorizations:</AuthHeader>\n          <ShelfIcon size={'1.3em'} direction={expanded ? 'down' : 'right'} />\n        </AuthHeaderColumn>\n        <SecuritiesColumn $expanded={expanded}>\n          {securities.map((security, idx) => (\n            <SecurityHeader\n              key={idx}\n              expanded={expanded}\n              showSecuritySchemeType={showSecuritySchemeType}\n              security={security}\n            />\n          ))}\n        </SecuritiesColumn>\n      </Wrap>\n      {expanded &&\n        !!operationSecuritySchemes?.length &&\n        operationSecuritySchemes.map((scheme, idx) => (\n          <SecurityDetailsStyle key={idx}>\n            <h5>\n              <LockIcon /> {AUTH_TYPES[scheme.type] || scheme.type}: {scheme.id}\n            </h5>\n            <Markdown source={scheme.description || ''} />\n            <SecurityDetails\n              key={scheme.id}\n              scheme={scheme}\n              RequiredScopes={\n                <RequiredScopesRow scopes={getRequiredScopes(scheme.id, securities)} />\n              }\n            />\n          </SecurityDetailsStyle>\n        ))}\n    </>\n  );\n}\n\nconst LockIcon = () => (\n  <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"11\" height=\"11\">\n    <path\n      fill=\"currentColor\"\n      d=\"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z\"\n    />\n  </svg>\n);\n\nfunction getRequiredScopes(id: string, securities: SecurityRequirementModel[]): string[] {\n  const allScopes: string[] = [];\n  let securitiesLength = securities.length;\n\n  while (securitiesLength--) {\n    const security = securities[securitiesLength];\n    let schemesLength = security.schemes.length;\n    while (schemesLength--) {\n      const scheme = security.schemes[schemesLength];\n      if (scheme.id === id && Array.isArray(scheme.scopes)) {\n        allScopes.push(...scheme.scopes);\n      }\n    }\n  }\n\n  return Array.from(new Set(allScopes));\n}\n"
  },
  {
    "path": "src/components/SecurityRequirement/styled.elements.ts",
    "content": "import styled from 'styled-components';\nimport { linksCss } from '../Markdown/styled.elements';\nimport { media } from '../../styled-components';\nimport { UnderlinedHeader } from '../../common-elements';\n\nexport const Header = styled.div`\n  background-color: #e4e7eb;\n`;\n\nexport const ScopeNameList = styled.ul`\n  display: inline;\n  list-style: none;\n  padding: 0;\n\n  li {\n    display: inherit;\n\n    &:after {\n      content: ',';\n    }\n    &:last-child:after {\n      content: none;\n    }\n  }\n`;\n\nexport const ScopeName = styled.code`\n  font-size: ${props => props.theme.typography.code.fontSize};\n  font-family: ${props => props.theme.typography.code.fontFamily};\n  margin: 0 3px;\n  padding: 0.2em;\n  display: inline-block;\n  line-height: 1;\n\n  &:after {\n    content: ',';\n    font-weight: normal;\n  }\n\n  &:last-child:after {\n    content: none;\n  }\n`;\n\nexport const SecurityRequirementAndWrap = styled.span`\n  &:after {\n    content: ' and ';\n    font-weight: normal;\n  }\n\n  &:last-child:after {\n    content: none;\n  }\n\n  ${linksCss};\n`;\n\nexport const SecurityRequirementOrWrap = styled.span<{ $expanded?: boolean }>`\n  ${p => !p.$expanded && `white-space: nowrap;`}\n  &:after {\n    content: ' or ';\n    ${p => p.$expanded && `content: ' or \\\\a';`}\n    white-space: pre;\n  }\n\n  &:last-child:after,\n  &:only-child:after {\n    content: none;\n  }\n\n  ${linksCss};\n`;\n\nexport const AuthHeaderColumn = styled.div`\n  flex: 1 1 auto;\n  cursor: pointer;\n`;\n\nexport const SecuritiesColumn = styled.div<{ $expanded?: boolean }>`\n  width: ${props => props.theme.schema.defaultDetailsWidth};\n  text-overflow: ellipsis;\n  border-radius: 4px;\n  overflow: hidden;\n  ${p =>\n    p.$expanded &&\n    `background: ${p.theme.colors.gray['100']};\n     padding: 8px 9.6px;\n     margin: 20px 0;\n     width: 100%;\n    `};\n  ${media.lessThan('small')`\n    margin-top: 10px;\n  `}\n`;\n\nexport const AuthHeader = styled(UnderlinedHeader)`\n  display: inline-block;\n  margin: 0;\n`;\n\nexport const Wrap = styled.div<{ $expanded?: boolean }>`\n  width: 100%;\n  display: flex;\n  margin: 1em 0;\n  flex-direction: ${p => (p.$expanded ? 'column' : 'row')};\n  ${media.lessThan('small')`\n    flex-direction: column;\n  `}\n`;\n\nexport const SecurityRow = styled.div`\n  margin: 0.5em 0;\n`;\n\nexport const SecurityDetailsStyle = styled.div`\n  border-bottom: 1px solid ${({ theme }) => theme.colors.border.dark};\n  margin-bottom: 1.5em;\n  padding-bottom: 0.7em;\n\n  h5 {\n    line-height: 1em;\n    margin: 0 0 0.6em;\n    font-size: ${({ theme }) => theme.typography.fontSize};\n  }\n\n  .redoc-markdown p:first-child {\n    display: inline;\n  }\n`;\n"
  },
  {
    "path": "src/components/SecuritySchemes/SecuritySchemes.tsx",
    "content": "import * as React from 'react';\n\nimport { SecuritySchemesModel } from '../../services';\nimport { H2, Row, ShareLink, MiddlePanel, Section } from '../../common-elements';\nimport { Markdown } from '../Markdown/Markdown';\nimport { SecurityDetails } from '../SecurityRequirement/SecurityDetails';\nimport { SecurityDetailsStyle, SecurityRow } from '../SecurityRequirement/styled.elements';\n\nexport const AUTH_TYPES = {\n  oauth2: 'OAuth2',\n  apiKey: 'API Key',\n  http: 'HTTP',\n  openIdConnect: 'OpenID Connect',\n};\n\nexport interface SecurityDefsProps {\n  securitySchemes: SecuritySchemesModel;\n}\n\nexport class SecurityDefs extends React.PureComponent<SecurityDefsProps> {\n  render() {\n    return this.props.securitySchemes.schemes.map(scheme => (\n      <Section id={scheme.sectionId} key={scheme.id}>\n        <Row>\n          <MiddlePanel>\n            <H2>\n              <ShareLink to={scheme.sectionId} />\n              {scheme.displayName}\n            </H2>\n            <Markdown source={scheme.description || ''} />\n            <SecurityDetailsStyle>\n              <SecurityRow>\n                <b>Security Scheme Type: </b>\n                <span>{AUTH_TYPES[scheme.type] || scheme.type}</span>\n              </SecurityRow>\n              <SecurityDetails scheme={scheme} />\n            </SecurityDetailsStyle>\n          </MiddlePanel>\n        </Row>\n      </Section>\n    ));\n  }\n}\n"
  },
  {
    "path": "src/components/SeeMore/SeeMore.tsx",
    "content": "import * as React from 'react';\nimport styled from 'styled-components';\n\nconst TOLERANCE_PX = 20;\n\ninterface SeeMoreProps {\n  children?: React.ReactNode;\n  height: string;\n}\n\nexport function SeeMore({ children, height }: SeeMoreProps): JSX.Element {\n  const ref = React.createRef() as React.RefObject<HTMLDivElement>;\n  const [showMore, setShowMore] = React.useState(false);\n  const [showLink, setShowLink] = React.useState(false);\n\n  React.useEffect(() => {\n    if (ref.current && ref.current.clientHeight + TOLERANCE_PX < ref.current.scrollHeight) {\n      setShowLink(true);\n    }\n  }, [ref]);\n\n  const onClickMore = () => {\n    setShowMore(!showMore);\n  };\n\n  return (\n    <>\n      <Container\n        ref={ref}\n        className={showMore ? '' : 'container'}\n        style={{ height: showMore ? 'auto' : height }}\n      >\n        {children}\n      </Container>\n      <ButtonContainer $dimmed={!showMore}>\n        {showLink && (\n          <ButtonLinkStyled onClick={onClickMore}>\n            {showMore ? 'See less' : 'See more'}\n          </ButtonLinkStyled>\n        )}\n      </ButtonContainer>\n    </>\n  );\n}\n\nconst Container = styled.div`\n  overflow-y: hidden;\n`;\n\nconst ButtonContainer = styled.div<{ $dimmed?: boolean }>`\n  text-align: center;\n  line-height: 1.5em;\n  ${({ $dimmed }) =>\n    $dimmed &&\n    `background-image: linear-gradient(to bottom, transparent,rgb(255 255 255));\n     position: relative;\n     top: -0.5em;\n     padding-top: 0.5em;\n     background-position-y: -1em;\n    `}\n`;\n\nconst ButtonLinkStyled = styled.a`\n  cursor: pointer;\n`;\n"
  },
  {
    "path": "src/components/SelectOnClick/SelectOnClick.tsx",
    "content": "import * as React from 'react';\n\nimport { ClipboardService } from '../../services';\n\nexport class SelectOnClick extends React.PureComponent<React.PropsWithChildren<any>> {\n  private child: HTMLDivElement | null;\n  selectElement = () => {\n    ClipboardService.selectElement(this.child);\n  };\n\n  render() {\n    const { children } = this.props;\n    return (\n      <div\n        ref={el => (this.child = el)}\n        onClick={this.selectElement}\n        onFocus={this.selectElement}\n        tabIndex={0}\n        role=\"button\"\n      >\n        {children}\n      </div>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/SideMenu/Logo.tsx",
    "content": "import { useEffect, useState } from 'react';\nimport * as React from 'react';\n\nexport default function RedoclyLogo(): JSX.Element | null {\n  const [isDisplay, setDisplay] = useState(false);\n\n  useEffect(() => {\n    setDisplay(true);\n  }, []);\n\n  return isDisplay ? (\n    <img\n      alt={'redocly logo'}\n      onError={() => setDisplay(false)}\n      src={'https://cdn.redoc.ly/redoc/logo-mini.svg'}\n    />\n  ) : null;\n}\n"
  },
  {
    "path": "src/components/SideMenu/MenuItem.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ShelfIcon } from '../../common-elements/shelfs';\nimport type { IMenuItem } from '../../services';\nimport { OperationModel } from '../../services';\nimport { l } from '../../services/Labels';\nimport { scrollIntoViewIfNeeded } from '../../utils';\nimport { shortenHTTPVerb } from '../../utils/openapi';\nimport { OptionsContext } from '../OptionsProvider';\nimport { MenuItems } from './MenuItems';\nimport { MenuItemLabel, MenuItemLi, MenuItemTitle, OperationBadge } from './styled.elements';\n\nexport interface MenuItemProps {\n  item: IMenuItem;\n  onActivate?: (item: IMenuItem) => void;\n  withoutChildren?: boolean;\n  children?: React.ReactChild;\n}\n\n@observer\nexport class MenuItem extends React.Component<MenuItemProps> {\n  ref = React.createRef<HTMLLabelElement>();\n\n  activate = (evt: React.MouseEvent<HTMLElement>) => {\n    this.props.onActivate!(this.props.item);\n    evt.stopPropagation();\n  };\n\n  componentDidMount() {\n    this.scrollIntoViewIfActive();\n  }\n\n  componentDidUpdate() {\n    this.scrollIntoViewIfActive();\n  }\n\n  scrollIntoViewIfActive() {\n    if (this.props.item.active && this.ref.current) {\n      scrollIntoViewIfNeeded(this.ref.current);\n    }\n  }\n\n  render() {\n    const { item, withoutChildren } = this.props;\n    return (\n      <MenuItemLi\n        tabIndex={0}\n        onClick={this.activate}\n        onKeyDown={evt => {\n          // Space or Enter key will activate the menu item\n          if (evt.key === 'Enter' || evt.key === ' ') {\n            this.props.onActivate!(this.props.item);\n            evt.stopPropagation();\n          }\n        }}\n        depth={item.depth}\n        data-item-id={item.id}\n        role=\"menuitem\"\n        aria-label={item.sidebarLabel}\n        aria-expanded={item.expanded}\n      >\n        {item.type === 'operation' ? (\n          <OperationMenuItemContent {...this.props} item={item as OperationModel} />\n        ) : (\n          <MenuItemLabel $depth={item.depth} $active={item.active} $type={item.type} ref={this.ref}>\n            {item.type === 'schema' && <OperationBadge type=\"schema\">schema</OperationBadge>}\n            <MenuItemTitle width=\"calc(100% - 38px)\" title={item.sidebarLabel}>\n              {item.sidebarLabel}\n              {this.props.children}\n            </MenuItemTitle>\n            {(item.depth > 0 && item.items.length > 0 && (\n              <ShelfIcon float={'right'} direction={item.expanded ? 'down' : 'right'} />\n            )) ||\n              null}\n          </MenuItemLabel>\n        )}\n        {!withoutChildren && item.items && item.items.length > 0 && (\n          <MenuItems\n            expanded={item.expanded}\n            items={item.items}\n            onActivate={this.props.onActivate}\n          />\n        )}\n      </MenuItemLi>\n    );\n  }\n}\n\nexport interface OperationMenuItemContentProps {\n  item: OperationModel;\n  children?: React.ReactChild;\n}\n\nexport const OperationMenuItemContent = observer((props: OperationMenuItemContentProps) => {\n  const { item } = props;\n  const ref = React.createRef<HTMLLabelElement>();\n  const { showWebhookVerb } = React.useContext(OptionsContext);\n\n  React.useEffect(() => {\n    if (props.item.active && ref.current) {\n      scrollIntoViewIfNeeded(ref.current);\n    }\n  }, [props.item.active, ref]);\n\n  return (\n    <MenuItemLabel\n      $depth={item.depth}\n      $active={item.active}\n      $deprecated={item.deprecated}\n      ref={ref}\n    >\n      {item.badges &&\n        item.badges?.map(({ name, color }) => (\n          <OperationBadge type=\"badge\" color={color} key={name}>\n            {name}\n          </OperationBadge>\n        ))}\n      {item.isWebhook ? (\n        <OperationBadge type=\"hook\">\n          {showWebhookVerb ? item.httpVerb : l('webhook')}\n        </OperationBadge>\n      ) : (\n        <OperationBadge type={item.httpVerb}>{shortenHTTPVerb(item.httpVerb)}</OperationBadge>\n      )}\n      <MenuItemTitle tabIndex={0} width=\"calc(100% - 38px)\">\n        {item.sidebarLabel}\n        {props.children}\n      </MenuItemTitle>\n    </MenuItemLabel>\n  );\n});\n"
  },
  {
    "path": "src/components/SideMenu/MenuItems.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport type { IMenuItem } from '../../services';\n\nimport { MenuItem } from './MenuItem';\nimport { MenuItemUl } from './styled.elements';\n\nexport interface MenuItemsProps {\n  items: IMenuItem[];\n  expanded?: boolean;\n  onActivate?: (item: IMenuItem) => void;\n  style?: React.CSSProperties;\n  root?: boolean;\n\n  className?: string;\n}\n\n@observer\nexport class MenuItems extends React.Component<MenuItemsProps> {\n  render() {\n    const { items, root, className } = this.props;\n    const expanded = this.props.expanded == null ? true : this.props.expanded;\n    return (\n      <MenuItemUl\n        className={className}\n        style={this.props.style}\n        $expanded={expanded}\n        {...(root ? { role: 'menu' } : {})}\n      >\n        {items.map((item, idx) => (\n          <MenuItem key={idx} item={item} onActivate={this.props.onActivate} />\n        ))}\n      </MenuItemUl>\n    );\n  }\n}\n"
  },
  {
    "path": "src/components/SideMenu/SideMenu.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { MenuStore } from '../../services';\nimport type { IMenuItem } from '../../services';\nimport { OptionsContext } from '../OptionsProvider';\nimport { MenuItems } from './MenuItems';\n\nimport { PerfectScrollbarWrap } from '../../common-elements/perfect-scrollbar';\nimport { RedocAttribution } from './styled.elements';\nimport RedoclyLogo from './Logo';\n\n@observer\nexport class SideMenu extends React.Component<{ menu: MenuStore; className?: string }> {\n  static contextType = OptionsContext;\n  declare context: React.ContextType<typeof OptionsContext>;\n  private _updateScroll?: () => void;\n\n  render() {\n    const store = this.props.menu;\n    return (\n      <PerfectScrollbarWrap\n        updateFn={this.saveScrollUpdate}\n        className={this.props.className}\n        options={{\n          wheelPropagation: false,\n        }}\n      >\n        <MenuItems items={store.items} onActivate={this.activate} root={true} />\n        <RedocAttribution>\n          <a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://redocly.com/redoc/\">\n            <RedoclyLogo />\n            API docs by Redocly\n          </a>\n        </RedocAttribution>\n      </PerfectScrollbarWrap>\n    );\n  }\n\n  activate = (item: IMenuItem) => {\n    if (item && item.active && this.context.menuToggle) {\n      return item.expanded ? item.collapse() : item.expand();\n    }\n    this.props.menu.activateAndScroll(item, true);\n    setTimeout(() => {\n      if (this._updateScroll) {\n        this._updateScroll();\n      }\n    });\n  };\n\n  private saveScrollUpdate = upd => {\n    this._updateScroll = upd;\n  };\n}\n"
  },
  {
    "path": "src/components/SideMenu/index.ts",
    "content": "export * from './MenuItem';\nexport * from './MenuItems';\nexport * from './SideMenu';\nexport * from './styled.elements';\n"
  },
  {
    "path": "src/components/SideMenu/styled.elements.ts",
    "content": "import * as classnames from 'classnames';\nimport { darken } from 'polished';\n\nimport { deprecatedCss, ShelfIcon } from '../../common-elements';\nimport styled, { css, media, ResolvedThemeInterface } from '../../styled-components';\n\nexport const OperationBadge = styled.span.attrs((props: { type: string; color?: string }) => ({\n  className: `operation-type ${props.type}`,\n}))<{ type: string; color?: string }>`\n  width: 9ex;\n  display: inline-block;\n  height: ${props => props.theme.typography.code.fontSize};\n  line-height: ${props => props.theme.typography.code.fontSize};\n  background-color: ${props => props.color || '#333'};\n  border-radius: 3px;\n  background-repeat: no-repeat;\n  background-position: 6px 4px;\n  font-size: 7px;\n  font-family: Verdana, sans-serif; // web-safe\n  color: white;\n  text-transform: uppercase;\n  text-align: center;\n  font-weight: bold;\n  vertical-align: middle;\n  margin-right: 6px;\n  margin-top: 2px;\n\n  &.get {\n    background-color: ${({ theme }) => theme.colors.http.get};\n  }\n\n  &.post {\n    background-color: ${({ theme }) => theme.colors.http.post};\n  }\n\n  &.put {\n    background-color: ${({ theme }) => theme.colors.http.put};\n  }\n\n  &.options {\n    background-color: ${({ theme }) => theme.colors.http.options};\n  }\n\n  &.patch {\n    background-color: ${({ theme }) => theme.colors.http.patch};\n  }\n\n  &.delete {\n    background-color: ${({ theme }) => theme.colors.http.delete};\n  }\n\n  &.basic {\n    background-color: ${({ theme }) => theme.colors.http.basic};\n  }\n\n  &.link {\n    background-color: ${({ theme }) => theme.colors.http.link};\n  }\n\n  &.head {\n    background-color: ${({ theme }) => theme.colors.http.head};\n  }\n\n  &.hook {\n    background-color: ${({ theme }) => theme.colors.primary.main};\n  }\n\n  &.schema {\n    background-color: ${({ theme }) => theme.colors.http.basic};\n  }\n`;\n\nfunction menuItemActive(\n  depth,\n  { theme }: { theme: ResolvedThemeInterface },\n  option: string,\n): string {\n  if (depth > 1) {\n    return theme.sidebar.level1Items[option];\n  } else if (depth === 1) {\n    return theme.sidebar.groupItems[option];\n  } else {\n    return '';\n  }\n}\n\nexport const MenuItemUl = styled.ul<{ $expanded: boolean }>`\n  margin: 0;\n  padding: 0;\n\n  &:first-child {\n    padding-bottom: 32px;\n  }\n\n  & & {\n    font-size: 0.929em;\n  }\n\n  ${props => (props.$expanded ? '' : 'display: none;')};\n`;\n\nexport const MenuItemLi = styled.li<{ depth: number }>`\n  list-style: none inside none;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding: 0;\n  ${props => (props.depth === 0 ? 'margin-top: 15px' : '')};\n`;\n\nexport const menuItemDepth = {\n  0: css`\n    opacity: 0.7;\n    text-transform: ${({ theme }) => theme.sidebar.groupItems.textTransform};\n    font-size: 0.8em;\n    padding-bottom: 0;\n    cursor: default;\n  `,\n  1: css`\n    font-size: 0.929em;\n    text-transform: ${({ theme }) => theme.sidebar.level1Items.textTransform};\n  `,\n};\n\nexport interface MenuItemLabelType {\n  $depth: number;\n  $active: boolean;\n  $deprecated?: boolean;\n  $type?: string;\n}\n\nexport const MenuItemLabel = styled.label.attrs((props: MenuItemLabelType) => ({\n  className: classnames('-depth' + props.$depth, {\n    active: props.$active,\n  }),\n}))<MenuItemLabelType>`\n  cursor: pointer;\n  color: ${props =>\n    props.$active\n      ? menuItemActive(props.$depth, props, 'activeTextColor')\n      : props.theme.sidebar.textColor};\n  margin: 0;\n  padding: 12.5px ${props => props.theme.spacing.unit * 4}px;\n  ${({ $depth, $type, theme }) =>\n    ($type === 'section' && $depth > 1 && 'padding-left: ' + theme.spacing.unit * 8 + 'px;') || ''}\n  display: flex;\n  justify-content: space-between;\n  font-family: ${props => props.theme.typography.headings.fontFamily};\n  ${props => menuItemDepth[props.$depth]};\n  background-color: ${props =>\n    props.$active\n      ? menuItemActive(props.$depth, props, 'activeBackgroundColor')\n      : props.theme.sidebar.backgroundColor};\n\n  ${props => (props.$deprecated && deprecatedCss) || ''};\n\n  &:hover {\n    color: ${props => menuItemActive(props.$depth, props, 'activeTextColor')};\n    background-color: ${props => menuItemActive(props.$depth, props, 'activeBackgroundColor')};\n  }\n\n  ${ShelfIcon} {\n    height: ${({ theme }) => theme.sidebar.arrow.size};\n    width: ${({ theme }) => theme.sidebar.arrow.size};\n    polygon {\n      fill: ${({ theme }) => theme.sidebar.arrow.color};\n    }\n  }\n`;\n\nexport const MenuItemTitle = styled.span<{ width?: string }>`\n  display: inline-block;\n  vertical-align: middle;\n  width: ${props => (props.width ? props.width : 'auto')};\n  overflow: hidden;\n  text-overflow: ellipsis;\n`;\n\nexport const RedocAttribution = styled.div`\n  ${({ theme }) => css`\n    font-size: 0.8em;\n    margin-top: ${theme.spacing.unit * 2}px;\n    text-align: center;\n    position: fixed;\n    width: ${theme.sidebar.width};\n    bottom: 0;\n    background: ${theme.sidebar.backgroundColor};\n\n    a,\n    a:visited,\n    a:hover {\n      color: ${theme.sidebar.textColor} !important;\n      padding: ${theme.spacing.unit}px 0;\n      border-top: 1px solid ${darken(0.1, theme.sidebar.backgroundColor)};\n      text-decoration: none;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n    }\n  `};\n  img {\n    width: 15px;\n    margin-right: 5px;\n  }\n\n  ${media.lessThan('small')`\n    width: 100%;\n  `};\n`;\n"
  },
  {
    "path": "src/components/SourceCode/SourceCode.tsx",
    "content": "import * as React from 'react';\nimport { highlight } from '../../utils';\n\nimport { SampleControls, SampleControlsWrap, StyledPre } from '../../common-elements';\nimport { CopyButtonWrapper } from '../../common-elements/CopyButtonWrapper';\n\nexport interface SourceCodeProps {\n  source: string;\n  lang: string;\n}\n\nexport const SourceCode = (props: SourceCodeProps) => {\n  const { source, lang } = props;\n  return <StyledPre dangerouslySetInnerHTML={{ __html: highlight(source, lang) }} />;\n};\n\nexport const SourceCodeWithCopy = (props: SourceCodeProps) => {\n  const { source, lang } = props;\n  return (\n    <CopyButtonWrapper data={source}>\n      {({ renderCopyButton }) => (\n        <SampleControlsWrap>\n          <SampleControls>{renderCopyButton()}</SampleControls>\n          <SourceCode lang={lang} source={source} />\n        </SampleControlsWrap>\n      )}\n    </CopyButtonWrapper>\n  );\n};\n"
  },
  {
    "path": "src/components/StickySidebar/ChevronSvg.tsx",
    "content": "import * as React from 'react';\n\nimport styled from '../../styled-components';\n\nexport const AnimatedChevronButton = ({ open }: { open: boolean }) => {\n  const iconOffset = open ? 8 : -4;\n\n  return (\n    <ChevronContainer>\n      <ChevronSvg\n        size={15}\n        style={{\n          transform: `translate(2px, ${iconOffset}px) rotate(180deg)`,\n          transition: 'transform 0.2s ease',\n        }}\n      />\n      <ChevronSvg\n        size={15}\n        style={{\n          transform: `translate(2px, ${0 - iconOffset}px)`,\n          transition: 'transform 0.2s ease',\n        }}\n      />\n    </ChevronContainer>\n  );\n};\n\n// adapted from reactjs.org\nconst ChevronSvg = ({ size = 10, className = '', style }) => (\n  <svg\n    className={className}\n    style={style || {}}\n    viewBox=\"0 0 926.23699 573.74994\"\n    version=\"1.1\"\n    x=\"0px\"\n    y=\"0px\"\n    width={size}\n    height={size}\n  >\n    <g transform=\"translate(904.92214,-879.1482)\">\n      <path\n        d={`\n          m -673.67664,1221.6502 -231.2455,-231.24803 55.6165,\n          -55.627 c 30.5891,-30.59485 56.1806,-55.627 56.8701,-55.627 0.6894,\n          0 79.8637,78.60862 175.9427,174.68583 l 174.6892,174.6858 174.6892,\n          -174.6858 c 96.079,-96.07721 175.253196,-174.68583 175.942696,\n          -174.68583 0.6895,0 26.281,25.03215 56.8701,\n          55.627 l 55.6165,55.627 -231.245496,231.24803 c -127.185,127.1864\n          -231.5279,231.248 -231.873,231.248 -0.3451,0 -104.688,\n          -104.0616 -231.873,-231.248 z\n        `}\n        fill=\"currentColor\"\n      />\n    </g>\n  </svg>\n);\n\nconst ChevronContainer = styled.div`\n  user-select: none;\n  width: 20px;\n  height: 20px;\n  align-self: center;\n  display: flex;\n  flex-direction: column;\n  color: ${props => props.theme.colors.primary.main};\n`;\n"
  },
  {
    "path": "src/components/StickySidebar/StickyResponsiveSidebar.tsx",
    "content": "import { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { MenuStore } from '../../services/MenuStore';\nimport { RedocNormalizedOptions, RedocRawOptions } from '../../services/RedocNormalizedOptions';\nimport styled, { media } from '../../styled-components';\nimport { IS_BROWSER } from '../../utils/index';\nimport { OptionsContext } from '../OptionsProvider';\nimport { AnimatedChevronButton } from './ChevronSvg';\n\nlet Stickyfill;\nif (IS_BROWSER) {\n  Stickyfill = require('stickyfill');\n}\n\nexport interface StickySidebarProps {\n  className?: string;\n  scrollYOffset?: RedocRawOptions['scrollYOffset']; // passed directly or via context\n  menu: MenuStore;\n}\n\nexport interface StickySidebarState {\n  offsetTop?: string;\n}\n\nconst stickyfill = Stickyfill && Stickyfill();\n\nconst StyledStickySidebar = styled.div<{ $open?: boolean }>`\n  width: ${props => props.theme.sidebar.width};\n  background-color: ${props => props.theme.sidebar.backgroundColor};\n  overflow: hidden;\n  display: flex;\n  flex-direction: column;\n\n  backface-visibility: hidden;\n  /* contain: strict; TODO: breaks layout since Chrome 80*/\n\n  height: 100vh;\n  position: sticky;\n  position: -webkit-sticky;\n  top: 0;\n\n  ${media.lessThan('small')`\n    position: fixed;\n    z-index: 20;\n    width: 100%;\n    background: ${({ theme }) => theme.sidebar.backgroundColor};\n    display: ${props => (props.$open ? 'flex' : 'none')};\n  `};\n\n  @media print {\n    display: none;\n  }\n`;\n\nconst FloatingButton = styled.div`\n  outline: none;\n  user-select: none;\n  background-color: ${({ theme }) => theme.fab.backgroundColor};\n  color: ${props => props.theme.colors.primary.main};\n  display: none;\n  cursor: pointer;\n  position: fixed;\n  right: 20px;\n  z-index: 100;\n  border-radius: 50%;\n  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);\n  ${media.lessThan('small')`\n    display: flex;\n  `};\n\n  bottom: 44px;\n\n  width: 60px;\n  height: 60px;\n  padding: 0 20px;\n  svg {\n    color: ${({ theme }) => theme.fab.color};\n  }\n\n  @media print {\n    display: none;\n  }\n`;\n\n@observer\nexport class StickyResponsiveSidebar extends React.Component<\n  React.PropsWithChildren<StickySidebarProps>,\n  StickySidebarState\n> {\n  static contextType = OptionsContext;\n  context!: React.ContextType<typeof OptionsContext>;\n  state: StickySidebarState = { offsetTop: '0px' };\n\n  stickyElement: Element;\n\n  componentDidMount() {\n    if (stickyfill) {\n      stickyfill.add(this.stickyElement);\n    }\n\n    // rerender when hydrating from SSR\n    // see https://github.com/facebook/react/issues/8017#issuecomment-256351955\n    this.setState({\n      offsetTop: this.getScrollYOffset(this.context),\n    });\n  }\n\n  componentWillUnmount() {\n    if (stickyfill) {\n      stickyfill.remove(this.stickyElement);\n    }\n  }\n\n  getScrollYOffset(options: RedocNormalizedOptions) {\n    let top;\n    if (this.props.scrollYOffset !== undefined) {\n      top = RedocNormalizedOptions.normalizeScrollYOffset(this.props.scrollYOffset)();\n    } else {\n      top = options.scrollYOffset();\n    }\n    return top + 'px';\n  }\n\n  render() {\n    const open = this.props.menu.sideBarOpened;\n\n    const top = this.state.offsetTop;\n\n    return (\n      <>\n        <StyledStickySidebar\n          $open={open}\n          className={this.props.className}\n          style={{\n            top,\n            height: `calc(100vh - ${top})`,\n          }}\n          // tslint:disable-next-line\n          ref={el => {\n            this.stickyElement = el as any;\n          }}\n        >\n          {this.props.children}\n        </StyledStickySidebar>\n        {!this.context.hideFab && (\n          <FloatingButton onClick={this.toggleNavMenu}>\n            <AnimatedChevronButton open={open} />\n          </FloatingButton>\n        )}\n      </>\n    );\n  }\n\n  private toggleNavMenu = () => {\n    this.props.menu.toggleSidebar();\n  };\n}\n"
  },
  {
    "path": "src/components/StoreBuilder.ts",
    "content": "import * as React from 'react';\nimport { createContext, useContext } from 'react';\n\nimport { AppStore } from '../services/';\nimport { RedocRawOptions } from '../services/RedocNormalizedOptions';\nimport { loadAndBundleSpec } from '../utils';\n\nexport interface StoreBuilderProps {\n  specUrl?: string;\n  spec?: object;\n  store?: AppStore;\n\n  options?: RedocRawOptions;\n\n  onLoaded?: (e?: Error) => void;\n\n  children: (props: { loading: boolean; store: AppStore | null }) => any;\n}\n\nexport interface StoreBuilderState {\n  error?: Error;\n  loading: boolean;\n  resolvedSpec?: any;\n  prevSpec?: any;\n  prevSpecUrl?: string;\n}\n\nconst StoreContext = createContext<AppStore | undefined>(undefined);\nconst { Provider, Consumer } = StoreContext;\nexport { Provider as StoreProvider, Consumer as StoreConsumer, StoreContext };\n\nexport function StoreBuilder(props: StoreBuilderProps) {\n  const { spec, specUrl, options, onLoaded, children } = props;\n\n  const [resolvedSpec, setResolvedSpec] = React.useState<any>(null);\n  const [error, setError] = React.useState<Error | null>(null);\n  if (error) {\n    throw error;\n  }\n\n  React.useEffect(() => {\n    async function load() {\n      if (!spec && !specUrl) {\n        return undefined;\n      }\n      setResolvedSpec(null);\n      try {\n        const resolved = await loadAndBundleSpec(spec || specUrl!);\n        setResolvedSpec(resolved);\n      } catch (e) {\n        if (onLoaded) {\n          onLoaded(e);\n        }\n        setError(e);\n        throw e;\n      }\n    }\n    load();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [spec, specUrl]);\n\n  const store = React.useMemo(() => {\n    if (!resolvedSpec) return null;\n    try {\n      return new AppStore(resolvedSpec, specUrl, options);\n    } catch (e) {\n      if (onLoaded) {\n        onLoaded(e);\n      }\n      throw e;\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [resolvedSpec, specUrl, options]);\n\n  React.useEffect(() => {\n    if (store && onLoaded) {\n      onLoaded();\n    }\n  }, [store, onLoaded]);\n\n  return children({\n    loading: !store,\n    store,\n  });\n}\n\nexport function useStore(): AppStore | undefined {\n  return useContext(StoreContext);\n}\n"
  },
  {
    "path": "src/components/__tests__/Callbacks.test.tsx",
    "content": "/* tslint:disable:no-implicit-dependencies */\n\nimport { shallow } from 'enzyme';\nimport * as React from 'react';\n\nimport { OpenAPIParser } from '../../services';\nimport { CallbackModel } from '../../services/models/Callback';\nimport { RedocNormalizedOptions } from '../../services/RedocNormalizedOptions';\nimport { CallbacksList, CallbackTitle, CallbackOperation } from '../Callbacks';\nimport * as simpleCallbackFixture from './fixtures/simple-callback.json';\n\nconst options = new RedocNormalizedOptions({});\ndescribe('Components', () => {\n  describe('Callbacks', () => {\n    it('should correctly render CallbackView', () => {\n      const parser = new OpenAPIParser(simpleCallbackFixture, undefined, options);\n      const callback = new CallbackModel(\n        parser,\n        'Test.Callback',\n        { $ref: '#/components/callbacks/Test' },\n        '',\n        options,\n      );\n      // There should be 1 operation defined in simple-callback.json, just get it manually for readability.\n      const callbackViewElement = shallow(\n        <CallbackOperation key={callback.name} callbackOperation={callback.operations[0]} />,\n      ).getElement();\n      expect(callbackViewElement.props).toBeDefined();\n      expect(callbackViewElement.props.children).toBeDefined();\n      expect(callbackViewElement.props.children.length).toBeGreaterThan(0);\n    });\n\n    it('should correctly render CallbackTitle', () => {\n      const callbackTitleViewElement = shallow(\n        <CallbackTitle name={'Test'} className={'.test'} onClick={undefined} httpVerb={'get'} />,\n      ).getElement();\n      expect(callbackTitleViewElement.props).toBeDefined();\n      expect(callbackTitleViewElement.props.className).toEqual('.test');\n      expect(callbackTitleViewElement.props.onClick).toBeUndefined();\n    });\n\n    it('should correctly render CallbacksList', () => {\n      const parser = new OpenAPIParser(simpleCallbackFixture, undefined, options);\n      const callback = new CallbackModel(\n        parser,\n        'Test.Callback',\n        { $ref: '#/components/callbacks/Test' },\n        '',\n        options,\n      );\n      const callbacksListViewElement = shallow(\n        <CallbacksList callbacks={[callback]} />,\n      ).getElement();\n      expect(callbacksListViewElement.props).toBeDefined();\n      expect(callbacksListViewElement.props.children).toBeDefined();\n      expect(callbacksListViewElement.props.children.length).toBeGreaterThan(0);\n    });\n  });\n});\n"
  },
  {
    "path": "src/components/__tests__/DiscriminatorDropdown.test.tsx",
    "content": "/* eslint-disable import/no-internal-modules */\n/* tslint:disable:no-implicit-dependencies */\n\nimport { shallow } from 'enzyme';\nimport toJson from 'enzyme-to-json';\nimport * as React from 'react';\n\nimport { filterPropsDeep } from '../../utils/test-utils';\n\nimport { ObjectSchema, Schema } from '../';\nimport { OpenAPIParser, SchemaModel } from '../../services';\nimport { RedocNormalizedOptions } from '../../services/RedocNormalizedOptions';\nimport * as simpleDiscriminatorFixture from './fixtures/simple-discriminator.json';\n\nconst options = new RedocNormalizedOptions({});\ndescribe('Components', () => {\n  describe('SchemaView', () => {\n    describe('discriminator', () => {\n      it('should correctly render SchemaView', () => {\n        const parser = new OpenAPIParser(simpleDiscriminatorFixture, undefined, options);\n\n        const schema = new SchemaModel(\n          parser,\n          { $ref: '#/components/schemas/Pet' },\n          '#/components/schemas/Pet',\n          options,\n        );\n        const schemaViewElement = shallow(<Schema schema={schema} />).getElement();\n        expect(schemaViewElement).toMatchSnapshot();\n        expect(schemaViewElement.props.discriminator).toBeDefined();\n        expect(schemaViewElement.props.discriminator.parentSchema).toBeDefined();\n        expect(schemaViewElement.props.discriminator.fieldName).toEqual('type');\n      });\n\n      it('should correctly render discriminator dropdown', () => {\n        const parser = new OpenAPIParser(simpleDiscriminatorFixture, undefined, options);\n\n        const schema = new SchemaModel(\n          parser,\n          { $ref: '#/components/schemas/Pet' },\n          '#/components/schemas/Pet',\n          options,\n        );\n        const schemaView = shallow(\n          <ObjectSchema\n            schema={schema.oneOf![0]}\n            discriminator={{\n              fieldName: schema.discriminatorProp,\n              parentSchema: schema,\n            }}\n          />,\n        );\n        expect(filterPropsDeep(toJson(schemaView), ['field.schema.options'])).toMatchSnapshot();\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "src/components/__tests__/FieldDetails.test.tsx",
    "content": "import * as React from 'react';\nimport { shallow } from 'enzyme';\n\nimport { FieldDetails } from '../Fields/FieldDetails';\nimport { SchemaModel } from '../../services/models/Schema';\nimport { withTheme } from '../testProviders';\n\njest.mock('../ExternalDocumentation/ExternalDocumentation', () => ({\n  ExternalDocumentation: () => {\n    return <div />;\n  },\n}));\n\ndescribe('FieldDetailsComponent', () => {\n  it('renders correctly', () => {\n    const mockFieldProps = {\n      showExamples: true,\n      field: {\n        schema: {\n          type: 'array',\n          default: [],\n          typePrefix: 'test type prefix',\n          displayType: 'array',\n          title: 'test title',\n          externalDocs: undefined,\n          constraints: [''],\n        } as SchemaModel,\n        example: 'example',\n        name: 'name',\n        expanded: false,\n        required: false,\n        kind: '',\n        deprecated: false,\n        collapse: jest.fn(),\n        toggle: jest.fn(),\n        explode: false,\n        expand: jest.fn(),\n        description: 'test description',\n      },\n      renderDiscriminatorSwitch: jest.fn(),\n    };\n\n    const wrapper = shallow(withTheme(<FieldDetails {...mockFieldProps} />));\n\n    expect(wrapper.render()).toMatchSnapshot();\n  });\n\n  it('renders correctly when default value is object in request body', () => {\n    const mockFieldProps = {\n      showExamples: true,\n      field: {\n        schema: {\n          type: 'object',\n          default: { properties: {} },\n          displayType: 'object',\n          title: 'test title',\n          externalDocs: undefined,\n          constraints: [''],\n        } as SchemaModel,\n        example: 'example',\n        name: 'name',\n        expanded: false,\n        required: false,\n        kind: '',\n        deprecated: false,\n        collapse: jest.fn(),\n        toggle: jest.fn(),\n        explode: false,\n        expand: jest.fn(),\n        description: 'test description',\n        in: undefined,\n      },\n      renderDiscriminatorSwitch: jest.fn(),\n    };\n    const wrapper = shallow(withTheme(<FieldDetails {...mockFieldProps} />));\n\n    expect(wrapper.render()).toMatchSnapshot();\n  });\n\n  it('renders correctly when field items have string type and pattern', () => {\n    const mockFieldProps = {\n      showExamples: true,\n      field: {\n        schema: {\n          type: 'array',\n          displayType: 'Array of strings',\n          title: 'test title',\n          externalDocs: undefined,\n          constraints: [''],\n          items: {\n            type: 'string',\n            pattern: '^see regex[0-9]$',\n            constraints: ['<= 128 characters'],\n            externalDocs: undefined,\n          },\n        } as any as SchemaModel,\n        example: 'example',\n        name: 'name',\n        expanded: false,\n        required: false,\n        kind: '',\n        deprecated: false,\n        collapse: jest.fn(),\n        toggle: jest.fn(),\n        explode: false,\n        expand: jest.fn(),\n        description: 'test description',\n        in: undefined,\n      },\n      renderDiscriminatorSwitch: jest.fn(),\n    };\n    const wrapper = shallow(withTheme(<FieldDetails {...mockFieldProps} />));\n\n    expect(wrapper.render()).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "src/components/__tests__/JsonViewer.tsx",
    "content": "/* tslint:disable:no-implicit-dependencies */\n\nimport { mount, ReactWrapper } from 'enzyme';\nimport * as React from 'react';\nimport { act } from 'react';\n\nimport { JsonViewer } from '../';\nimport { withTheme } from '../testProviders';\n\nimport { ClipboardService } from '../../services/ClipboardService';\n\nconst origCopySelected = ClipboardService.copySelected;\n\ndescribe('Components', () => {\n  describe('JsonViewer', () => {\n    let component: ReactWrapper;\n    const data = { a: 1, b: { c: 'hello' } };\n    beforeEach(() => {\n      component = mount(withTheme(<JsonViewer data={data} />));\n      ClipboardService.copySelected = origCopySelected;\n    });\n\n    test('should render inner HTML', () => {\n      expect(component.html()).toContain('class=\"redoc-json\"');\n    });\n\n    test('should collapse/uncollapse', () => {\n      expect(component.html()).not.toContain('class=\"hoverable\"'); // all are collapsed by default\n      const expandAll = component.find('div > button[children=\" Expand all \"]');\n      expandAll.simulate('click');\n      expect(component.html()).toContain('class=\"hoverable\"'); // all are collapsed\n\n      const collapseAll = component.find('div > button[children=\" Collapse all \"]');\n      collapseAll.simulate('click');\n      expect(component.html()).not.toContain('class=\"hoverable\"'); // all are collapsed\n    });\n\n    test('should collapse/uncollapse', () => {\n      ClipboardService.copySelected = jest.fn();\n\n      const copy = component.find('button[onClick]').first();\n      copy.simulate('click');\n\n      expect(ClipboardService.copySelected as jest.Mock).toHaveBeenCalled();\n    });\n\n    test('Expand/Collapse buttons disappears for flat structures', () => {\n      const flatData = { a: 1, b: '2', c: null };\n      const flatDataComponent = mount(withTheme(<JsonViewer data={flatData} />));\n\n      expect(flatDataComponent.html()).not.toContain('Expand all');\n      expect(flatDataComponent.html()).not.toContain('Collapse all');\n    });\n\n    describe('Keyboard Navigation', () => {\n      let component: ReactWrapper;\n      const data = {\n        a: 1,\n        b: {\n          c:\n            // Long string to test horizontal scrolling\n            Array(100).fill('hello').join(''),\n        },\n      };\n\n      beforeEach(() => {\n        component = mount(withTheme(<JsonViewer data={data} />));\n        ClipboardService.copySelected = origCopySelected;\n      });\n\n      test('should handle arrow key navigation', () => {\n        const prismDiv = component.find('div[tabIndex=0]');\n        const divElement = prismDiv.getDOMNode();\n\n        // Mock scrollLeft before events\n        Object.defineProperty(divElement, 'scrollLeft', {\n          get: jest.fn(() => 0),\n          set: jest.fn(),\n        });\n\n        // Trigger events inside act()\n        act(() => {\n          divElement.dispatchEvent(\n            new KeyboardEvent('keydown', {\n              key: 'ArrowRight',\n              bubbles: true,\n            }),\n          );\n        });\n\n        act(() => {\n          divElement.dispatchEvent(\n            new KeyboardEvent('keydown', {\n              key: 'ArrowLeft',\n              bubbles: true,\n            }),\n          );\n        });\n\n        expect(divElement.scrollLeft).toBe(0);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "src/components/__tests__/OneOfSchema.test.tsx",
    "content": "/* tslint:disable:no-implicit-dependencies */\n\nimport { shallow } from 'enzyme';\nimport * as React from 'react';\n\nimport { OneOfSchema, Schema } from '../';\nimport { OpenAPIParser, SchemaModel } from '../../services';\nimport { RedocNormalizedOptions } from '../../services/RedocNormalizedOptions';\nimport { withTheme } from '../testProviders';\n\nconst options = new RedocNormalizedOptions({});\ndescribe('Components', () => {\n  describe('SchemaView', () => {\n    const parser = new OpenAPIParser(\n      { openapi: '3.0', info: { title: 'test', version: '0' }, paths: {} },\n      undefined,\n      options,\n    );\n\n    describe('OneOf', () => {\n      it('should pass down skipReadOnly/skipReadWrite to nested oneOf', () => {\n        const schema = new SchemaModel(\n          parser,\n          { oneOf: [{ type: 'string' }, { type: 'integer' }] },\n          '',\n          options,\n        );\n        let schemaViewElement = shallow(\n          <Schema schema={schema} skipWriteOnly={true} />,\n        ).getElement();\n        expect(schemaViewElement.type).toEqual(OneOfSchema);\n        expect(schemaViewElement.props.skipWriteOnly).toBeTruthy();\n        expect(schemaViewElement.props.skipReadOnly).toBeFalsy();\n\n        schemaViewElement = shallow(<Schema schema={schema} skipReadOnly={true} />).getElement();\n\n        expect(schemaViewElement.type).toEqual(OneOfSchema);\n        expect(schemaViewElement.props.skipWriteOnly).toBeFalsy();\n        expect(schemaViewElement.props.skipReadOnly).toBeTruthy();\n      });\n    });\n\n    describe('OneOf deprecated', () => {\n      const schema = new SchemaModel(\n        parser,\n        { oneOf: [{ type: 'string', deprecated: true }, { type: 'integer' }] },\n        '',\n        options,\n      );\n\n      it('should match snapshot', () => {\n        const component = shallow(withTheme(<Schema schema={schema} />));\n        expect(component.render()).toMatchSnapshot();\n      });\n    });\n\n    describe('Show minProperties/maxProperties constraints oneOf', () => {\n      const schema = new SchemaModel(\n        parser,\n        {\n          oneOf: [\n            {\n              type: 'object',\n              description: 'Test description',\n              minProperties: 1,\n              maxProperties: 1,\n              additionalProperties: {\n                type: 'string',\n                description: 'The name and value o',\n              },\n            },\n          ],\n        },\n        '',\n        options,\n      );\n\n      const component = shallow(withTheme(<Schema schema={schema} />));\n      expect(component.html().includes('= 1 properties')).toBe(true);\n    });\n  });\n});\n"
  },
  {
    "path": "src/components/__tests__/Schema.test.tsx",
    "content": "/* tslint:disable:no-implicit-dependencies */\n\nimport { shallow } from 'enzyme';\nimport * as React from 'react';\n\nimport { Schema } from '../';\nimport { OpenAPIParser, SchemaModel } from '../../services';\nimport { RedocNormalizedOptions } from '../../services/RedocNormalizedOptions';\nimport { withTheme } from '../testProviders';\n\nconst options = new RedocNormalizedOptions({});\ndescribe('Components', () => {\n  describe('SchemaView', () => {\n    const parser = new OpenAPIParser(\n      { openapi: '3.0', info: { title: 'test', version: '0' }, paths: {} },\n      undefined,\n      options,\n    );\n\n    describe('Show minProperties/maxProperties constraints', () => {\n      const schema = new SchemaModel(\n        parser,\n        {\n          properties: {\n            name: {\n              type: 'object',\n              minProperties: 1,\n              properties: {\n                address: {\n                  type: 'string',\n                },\n              },\n            },\n          },\n        },\n        '',\n        options,\n      );\n      const component = shallow(withTheme(<Schema schema={schema} />));\n      expect(component.html().includes('non-empty')).toBe(true);\n    });\n\n    describe('Show range minProperties/maxProperties constraints', () => {\n      const schema = new SchemaModel(\n        parser,\n        {\n          properties: {\n            name: {\n              type: 'object',\n              minProperties: 2,\n              maxProperties: 10,\n              additionalProperties: {\n                type: 'string',\n              },\n            },\n          },\n        },\n        '',\n        options,\n      );\n      it('should includes [ 2 .. 10 ] properties', () => {\n        const component = shallow(withTheme(<Schema schema={schema} />));\n        expect(component.html().includes('[ 2 .. 10 ] properties')).toBe(true);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "src/components/__tests__/SchemaDefinition.test.tsx",
    "content": "/* tslint:disable:no-implicit-dependencies */\n\nimport { shallow } from 'enzyme';\nimport * as React from 'react';\n\nimport { SchemaDefinition } from '..';\nimport { OpenAPIParser } from '../../services';\nimport { RedocNormalizedOptions } from '../../services/RedocNormalizedOptions';\nimport { withTheme } from '../testProviders';\n\nconst options = new RedocNormalizedOptions({});\ndescribe('Components', () => {\n  describe('SchemaDefinition', () => {\n    const parser = new OpenAPIParser(\n      {\n        openapi: '3.0',\n        info: {\n          title: 'test',\n          version: '0',\n        },\n        paths: {},\n        components: {\n          schemas: {\n            test: {\n              type: 'object',\n              properties: {\n                id: {\n                  type: 'string',\n                },\n              },\n            },\n          },\n        },\n      },\n      undefined,\n      options,\n    );\n\n    describe('Show example constraints', () => {\n      it('should show the example as default', () => {\n        const component = shallow(\n          withTheme(\n            <SchemaDefinition\n              schemaRef=\"#/components/schemas/test\"\n              parser={parser}\n              options={options}\n            />,\n          ),\n        );\n        expect(component.html().includes('<code>')).toBe(true);\n      });\n\n      it('should show the example if `showExample` is `true`', () => {\n        const component = shallow(\n          withTheme(\n            <SchemaDefinition\n              schemaRef=\"#/components/schemas/test\"\n              parser={parser}\n              options={options}\n              showExample={true}\n            />,\n          ),\n        );\n        expect(component.html().includes('<code>')).toBe(true);\n      });\n\n      it('should hide the example if `showExample` is `false`', () => {\n        const component = shallow(\n          withTheme(\n            <SchemaDefinition\n              schemaRef=\"#/components/schemas/test\"\n              parser={parser}\n              options={options}\n              showExample={false}\n            />,\n          ),\n        );\n        expect(component.html().includes('<code>')).toBe(false);\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "src/components/__tests__/SecurityRequirement.test.tsx",
    "content": "import * as React from 'react';\nimport { mount } from 'enzyme';\n\nimport {\n  createStore,\n  OpenAPIParser,\n  OperationModel,\n  RedocNormalizedOptions,\n  SecuritySchemesModel,\n} from '../../services';\nimport { StoreProvider } from '../StoreBuilder';\nimport { SecurityRequirementModel } from '../../services/models/SecurityRequirement';\nimport { SecurityRequirements } from '../SecurityRequirement/SecurityRequirement';\nimport { withTheme } from '../testProviders';\nimport { SecurityDefs } from '../SecuritySchemes/SecuritySchemes';\nimport * as simpleSecurityFixture from './fixtures/simple-security-fixture.json';\n\ndescribe('SecurityRequirement', () => {\n  it('should render authDefinition', async () => {\n    const store = await createStore(simpleSecurityFixture, undefined, {\n      showSecuritySchemeType: true,\n    });\n\n    store.spec.contentItems.forEach((item: OperationModel) => {\n      if (item.security) {\n        const component = mount(\n          withTheme(\n            <StoreProvider value={store}>\n              <SecurityRequirements securities={item.security} />,\n            </StoreProvider>,\n          ),\n        );\n        expect(component.html()).toMatchSnapshot();\n        component.find('svg').simulate('click');\n        //Security expanded\n        expect(component.html()).toMatchSnapshot();\n      }\n    });\n  });\n\n  it('should render SecurityDefs', async () => {\n    const parser = new OpenAPIParser(\n      simpleSecurityFixture,\n      undefined,\n      new RedocNormalizedOptions({}),\n    );\n\n    const component = mount(\n      withTheme(<SecurityDefs securitySchemes={new SecuritySchemesModel(parser)} />),\n    );\n    expect(component.html()).toMatchSnapshot();\n  });\n\n  it(\"should render 'None' when empty object in security open api\", () => {\n    const options = new RedocNormalizedOptions({});\n    const parser = new OpenAPIParser(\n      { openapi: '3.0', info: { title: 'test', version: '0' }, paths: {} },\n      undefined,\n      options,\n    );\n    const securityRequirement = [new SecurityRequirementModel({}, parser)];\n    const component = mount(\n      withTheme(<SecurityRequirements securities={securityRequirement} key={1} />),\n    );\n    expect(component.find('span').at(0).text()).toEqual('None');\n  });\n\n  it('should hide authDefinition', async () => {\n    const store = await createStore(simpleSecurityFixture, undefined, {\n      hideSecuritySection: true,\n    });\n\n    store.spec.contentItems.forEach((item: OperationModel) => {\n      if (item.security) {\n        const component = mount(\n          withTheme(\n            <StoreProvider value={store}>\n              <SecurityRequirements securities={item.security} />,\n            </StoreProvider>,\n          ),\n        );\n        expect(component.html().includes('Authorizations')).toBe(false);\n        expect(component.html().includes('svg')).toBe(false);\n      }\n    });\n  });\n});\n"
  },
  {
    "path": "src/components/__tests__/__snapshots__/DiscriminatorDropdown.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Components SchemaView discriminator should correctly render SchemaView 1`] = `\n<Unknown\n  discriminator={\n    {\n      \"fieldName\": \"type\",\n      \"parentSchema\": SchemaModel {\n        \"activeOneOf\": 0,\n        \"const\": \"\",\n        \"constraints\": [],\n        \"contentEncoding\": undefined,\n        \"contentMediaType\": undefined,\n        \"default\": undefined,\n        \"deprecated\": false,\n        \"description\": \"\",\n        \"discriminatorProp\": \"type\",\n        \"displayFormat\": undefined,\n        \"displayType\": \"object\",\n        \"enum\": [],\n        \"example\": undefined,\n        \"examples\": undefined,\n        \"externalDocs\": undefined,\n        \"format\": undefined,\n        \"isCircular\": false,\n        \"isPrimitive\": false,\n        \"maxItems\": undefined,\n        \"minItems\": undefined,\n        \"oneOf\": [\n          SchemaModel {\n            \"activeOneOf\": 0,\n            \"const\": \"\",\n            \"constraints\": [],\n            \"contentEncoding\": undefined,\n            \"contentMediaType\": undefined,\n            \"default\": undefined,\n            \"deprecated\": false,\n            \"description\": \"\",\n            \"displayFormat\": undefined,\n            \"displayType\": \"object\",\n            \"enum\": [],\n            \"example\": undefined,\n            \"examples\": undefined,\n            \"externalDocs\": undefined,\n            \"fields\": [\n              FieldModel {\n                \"const\": \"\",\n                \"deprecated\": false,\n                \"description\": \"\",\n                \"example\": undefined,\n                \"expanded\": undefined,\n                \"explode\": false,\n                \"in\": undefined,\n                \"kind\": \"field\",\n                \"name\": \"packSize\",\n                \"required\": false,\n                \"schema\": SchemaModel {\n                  \"activeOneOf\": 0,\n                  \"const\": \"\",\n                  \"constraints\": [],\n                  \"contentEncoding\": undefined,\n                  \"contentMediaType\": undefined,\n                  \"default\": undefined,\n                  \"deprecated\": false,\n                  \"description\": \"\",\n                  \"displayFormat\": undefined,\n                  \"displayType\": \"number\",\n                  \"enum\": [],\n                  \"example\": undefined,\n                  \"examples\": undefined,\n                  \"externalDocs\": undefined,\n                  \"format\": undefined,\n                  \"isCircular\": false,\n                  \"isPrimitive\": true,\n                  \"maxItems\": undefined,\n                  \"minItems\": undefined,\n                  \"options\": RedocNormalizedOptions {\n                    \"allowedMdComponents\": {},\n                    \"disableSearch\": false,\n                    \"downloadDefinitionUrl\": undefined,\n                    \"downloadFileName\": undefined,\n                    \"downloadUrls\": undefined,\n                    \"enumSkipQuotes\": false,\n                    \"expandDefaultServerVariables\": false,\n                    \"expandResponses\": {},\n                    \"expandSingleSchemaField\": false,\n                    \"generatedSamplesMaxDepth\": 10,\n                    \"hideDownloadButtons\": false,\n                    \"hideFab\": false,\n                    \"hideHostname\": false,\n                    \"hidePropertiesPrefix\": true,\n                    \"hideRequestPayloadSample\": false,\n                    \"hideSchemaPattern\": false,\n                    \"hideSchemaTitles\": false,\n                    \"hideSecuritySection\": false,\n                    \"hideSingleRequestSampleTab\": false,\n                    \"ignoreNamedSchemas\": Set {},\n                    \"jsonSamplesExpandLevel\": 2,\n                    \"maxDisplayedEnumValues\": undefined,\n                    \"menuToggle\": true,\n                    \"minCharacterLengthToInitSearch\": 3,\n                    \"nativeScrollbars\": false,\n                    \"nonce\": undefined,\n                    \"onlyRequiredInSamples\": false,\n                    \"pathInMiddlePanel\": false,\n                    \"payloadSampleIdx\": 0,\n                    \"sanitize\": false,\n                    \"schemaDefinitionsTagName\": undefined,\n                    \"schemasExpansionLevel\": 0,\n                    \"scrollYOffset\": [Function],\n                    \"showExtensions\": false,\n                    \"showObjectSchemaExamples\": false,\n                    \"showSecuritySchemeType\": false,\n                    \"showWebhookVerb\": false,\n                    \"sideNavStyle\": \"summary-only\",\n                    \"simpleOneOfTypeLabel\": false,\n                    \"sortEnumValuesAlphabetically\": false,\n                    \"sortOperationsAlphabetically\": false,\n                    \"sortPropsAlphabetically\": false,\n                    \"sortRequiredPropsFirst\": false,\n                    \"sortTagsAlphabetically\": false,\n                    \"theme\": {\n                      \"breakpoints\": {\n                        \"large\": \"105rem\",\n                        \"medium\": \"75rem\",\n                        \"small\": \"50rem\",\n                      },\n                      \"codeBlock\": {\n                        \"backgroundColor\": \"#11171a\",\n                      },\n                      \"colors\": {\n                        \"border\": {\n                          \"dark\": \"rgba(0,0,0, 0.1)\",\n                          \"light\": \"#ffffff\",\n                        },\n                        \"error\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#7a1210\",\n                          \"light\": \"#eb6d6b\",\n                          \"main\": \"#d41f1c\",\n                        },\n                        \"gray\": {\n                          \"100\": \"#F5F5F5\",\n                          \"50\": \"#FAFAFA\",\n                        },\n                        \"http\": {\n                          \"basic\": \"#707070\",\n                          \"delete\": \"#cc3333\",\n                          \"get\": \"#2F8132\",\n                          \"head\": \"#A23DAD\",\n                          \"link\": \"#07818F\",\n                          \"options\": \"#947014\",\n                          \"patch\": \"#bf581d\",\n                          \"post\": \"#186FAF\",\n                          \"put\": \"#95507c\",\n                        },\n                        \"primary\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#1a1a51\",\n                          \"light\": \"#6868cf\",\n                          \"main\": \"#32329f\",\n                        },\n                        \"responses\": {\n                          \"error\": {\n                            \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                            \"color\": \"#d41f1c\",\n                            \"tabTextColor\": \"#d41f1c\",\n                          },\n                          \"info\": {\n                            \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                            \"color\": \"#87ceeb\",\n                            \"tabTextColor\": \"#87ceeb\",\n                          },\n                          \"redirect\": {\n                            \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                            \"color\": \"#ffa500\",\n                            \"tabTextColor\": \"#ffa500\",\n                          },\n                          \"success\": {\n                            \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                            \"color\": \"#1d8127\",\n                            \"tabTextColor\": \"#1d8127\",\n                          },\n                        },\n                        \"success\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#0a2e0e\",\n                          \"light\": \"#86e490\",\n                          \"main\": \"#1d8127\",\n                        },\n                        \"text\": {\n                          \"primary\": \"#333333\",\n                          \"secondary\": \"#666\",\n                        },\n                        \"tonalOffset\": 0.2,\n                        \"warning\": {\n                          \"contrastText\": \"#ffffff\",\n                          \"dark\": \"#996300\",\n                          \"light\": \"#ffc966\",\n                          \"main\": \"#ffa500\",\n                        },\n                      },\n                      \"extensionsHook\": undefined,\n                      \"fab\": {\n                        \"backgroundColor\": \"#f2f2f2\",\n                        \"color\": \"#0065FB\",\n                      },\n                      \"logo\": {\n                        \"gutter\": \"2px\",\n                        \"maxHeight\": \"260px\",\n                        \"maxWidth\": \"260px\",\n                      },\n                      \"rightPanel\": {\n                        \"backgroundColor\": \"#263238\",\n                        \"servers\": {\n                          \"overlay\": {\n                            \"backgroundColor\": \"#fafafa\",\n                            \"textColor\": \"#263238\",\n                          },\n                          \"url\": {\n                            \"backgroundColor\": \"#fff\",\n                          },\n                        },\n                        \"textColor\": \"#ffffff\",\n                        \"width\": \"40%\",\n                      },\n                      \"schema\": {\n                        \"arrow\": {\n                          \"color\": \"#666\",\n                          \"size\": \"1.1em\",\n                        },\n                        \"defaultDetailsWidth\": \"75%\",\n                        \"labelsTextSize\": \"0.9em\",\n                        \"linesColor\": \"#7c7cbb\",\n                        \"nestedBackground\": \"#fafafa\",\n                        \"nestingSpacing\": \"1em\",\n                        \"requireLabelColor\": \"#d41f1c\",\n                        \"typeNameColor\": \"#666\",\n                        \"typeTitleColor\": \"#666\",\n                      },\n                      \"sidebar\": {\n                        \"activeTextColor\": \"#32329f\",\n                        \"arrow\": {\n                          \"color\": \"#333333\",\n                          \"size\": \"1.5em\",\n                        },\n                        \"backgroundColor\": \"#fafafa\",\n                        \"groupItems\": {\n                          \"activeBackgroundColor\": \"#e1e1e1\",\n                          \"activeTextColor\": \"#32329f\",\n                          \"textTransform\": \"uppercase\",\n                        },\n                        \"level1Items\": {\n                          \"activeBackgroundColor\": \"#ededed\",\n                          \"activeTextColor\": \"#32329f\",\n                          \"textTransform\": \"none\",\n                        },\n                        \"textColor\": \"#333333\",\n                        \"width\": \"260px\",\n                      },\n                      \"spacing\": {\n                        \"sectionHorizontal\": 40,\n                        \"sectionVertical\": 40,\n                        \"unit\": 5,\n                      },\n                      \"typography\": {\n                        \"code\": {\n                          \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                          \"color\": \"#e53935\",\n                          \"fontFamily\": \"Courier, monospace\",\n                          \"fontSize\": \"13px\",\n                          \"fontWeight\": \"400\",\n                          \"lineHeight\": \"1.5em\",\n                          \"wrap\": false,\n                        },\n                        \"fontFamily\": \"Roboto, sans-serif\",\n                        \"fontSize\": \"14px\",\n                        \"fontWeightBold\": \"600\",\n                        \"fontWeightLight\": \"300\",\n                        \"fontWeightRegular\": \"400\",\n                        \"headings\": {\n                          \"fontFamily\": \"Montserrat, sans-serif\",\n                          \"fontWeight\": \"400\",\n                          \"lineHeight\": \"1.6em\",\n                        },\n                        \"lineHeight\": \"1.5em\",\n                        \"links\": {\n                          \"color\": \"#32329f\",\n                          \"hover\": \"#6868cf\",\n                          \"hoverTextDecoration\": \"auto\",\n                          \"textDecoration\": \"auto\",\n                          \"visited\": \"#32329f\",\n                        },\n                        \"optimizeSpeed\": true,\n                        \"smoothing\": \"antialiased\",\n                      },\n                    },\n                    \"unstable_ignoreMimeParameters\": false,\n                  },\n                  \"pattern\": undefined,\n                  \"pointer\": \"#/components/schemas/Dog/properties/packSize\",\n                  \"rawSchema\": {\n                    \"default\": undefined,\n                    \"type\": \"number\",\n                  },\n                  \"readOnly\": false,\n                  \"refsStack\": [\n                    \"#/components/schemas/Dog\",\n                    \"#/components/schemas/Dog/properties/packSize\",\n                  ],\n                  \"schema\": {\n                    \"default\": undefined,\n                    \"type\": \"number\",\n                  },\n                  \"title\": \"\",\n                  \"type\": \"number\",\n                  \"typePrefix\": \"\",\n                  \"writeOnly\": false,\n                  \"x-enumDescriptions\": undefined,\n                },\n              },\n              FieldModel {\n                \"const\": \"\",\n                \"deprecated\": false,\n                \"description\": \"\",\n                \"example\": undefined,\n                \"expanded\": undefined,\n                \"explode\": false,\n                \"in\": undefined,\n                \"kind\": \"field\",\n                \"name\": \"type\",\n                \"required\": true,\n                \"schema\": SchemaModel {\n                  \"activeOneOf\": 0,\n                  \"const\": \"\",\n                  \"constraints\": [],\n                  \"contentEncoding\": undefined,\n                  \"contentMediaType\": undefined,\n                  \"default\": undefined,\n                  \"deprecated\": false,\n                  \"description\": \"\",\n                  \"displayFormat\": undefined,\n                  \"displayType\": \"string\",\n                  \"enum\": [],\n                  \"example\": undefined,\n                  \"examples\": undefined,\n                  \"externalDocs\": undefined,\n                  \"format\": undefined,\n                  \"isCircular\": false,\n                  \"isPrimitive\": true,\n                  \"maxItems\": undefined,\n                  \"minItems\": undefined,\n                  \"options\": RedocNormalizedOptions {\n                    \"allowedMdComponents\": {},\n                    \"disableSearch\": false,\n                    \"downloadDefinitionUrl\": undefined,\n                    \"downloadFileName\": undefined,\n                    \"downloadUrls\": undefined,\n                    \"enumSkipQuotes\": false,\n                    \"expandDefaultServerVariables\": false,\n                    \"expandResponses\": {},\n                    \"expandSingleSchemaField\": false,\n                    \"generatedSamplesMaxDepth\": 10,\n                    \"hideDownloadButtons\": false,\n                    \"hideFab\": false,\n                    \"hideHostname\": false,\n                    \"hidePropertiesPrefix\": true,\n                    \"hideRequestPayloadSample\": false,\n                    \"hideSchemaPattern\": false,\n                    \"hideSchemaTitles\": false,\n                    \"hideSecuritySection\": false,\n                    \"hideSingleRequestSampleTab\": false,\n                    \"ignoreNamedSchemas\": Set {},\n                    \"jsonSamplesExpandLevel\": 2,\n                    \"maxDisplayedEnumValues\": undefined,\n                    \"menuToggle\": true,\n                    \"minCharacterLengthToInitSearch\": 3,\n                    \"nativeScrollbars\": false,\n                    \"nonce\": undefined,\n                    \"onlyRequiredInSamples\": false,\n                    \"pathInMiddlePanel\": false,\n                    \"payloadSampleIdx\": 0,\n                    \"sanitize\": false,\n                    \"schemaDefinitionsTagName\": undefined,\n                    \"schemasExpansionLevel\": 0,\n                    \"scrollYOffset\": [Function],\n                    \"showExtensions\": false,\n                    \"showObjectSchemaExamples\": false,\n                    \"showSecuritySchemeType\": false,\n                    \"showWebhookVerb\": false,\n                    \"sideNavStyle\": \"summary-only\",\n                    \"simpleOneOfTypeLabel\": false,\n                    \"sortEnumValuesAlphabetically\": false,\n                    \"sortOperationsAlphabetically\": false,\n                    \"sortPropsAlphabetically\": false,\n                    \"sortRequiredPropsFirst\": false,\n                    \"sortTagsAlphabetically\": false,\n                    \"theme\": {\n                      \"breakpoints\": {\n                        \"large\": \"105rem\",\n                        \"medium\": \"75rem\",\n                        \"small\": \"50rem\",\n                      },\n                      \"codeBlock\": {\n                        \"backgroundColor\": \"#11171a\",\n                      },\n                      \"colors\": {\n                        \"border\": {\n                          \"dark\": \"rgba(0,0,0, 0.1)\",\n                          \"light\": \"#ffffff\",\n                        },\n                        \"error\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#7a1210\",\n                          \"light\": \"#eb6d6b\",\n                          \"main\": \"#d41f1c\",\n                        },\n                        \"gray\": {\n                          \"100\": \"#F5F5F5\",\n                          \"50\": \"#FAFAFA\",\n                        },\n                        \"http\": {\n                          \"basic\": \"#707070\",\n                          \"delete\": \"#cc3333\",\n                          \"get\": \"#2F8132\",\n                          \"head\": \"#A23DAD\",\n                          \"link\": \"#07818F\",\n                          \"options\": \"#947014\",\n                          \"patch\": \"#bf581d\",\n                          \"post\": \"#186FAF\",\n                          \"put\": \"#95507c\",\n                        },\n                        \"primary\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#1a1a51\",\n                          \"light\": \"#6868cf\",\n                          \"main\": \"#32329f\",\n                        },\n                        \"responses\": {\n                          \"error\": {\n                            \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                            \"color\": \"#d41f1c\",\n                            \"tabTextColor\": \"#d41f1c\",\n                          },\n                          \"info\": {\n                            \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                            \"color\": \"#87ceeb\",\n                            \"tabTextColor\": \"#87ceeb\",\n                          },\n                          \"redirect\": {\n                            \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                            \"color\": \"#ffa500\",\n                            \"tabTextColor\": \"#ffa500\",\n                          },\n                          \"success\": {\n                            \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                            \"color\": \"#1d8127\",\n                            \"tabTextColor\": \"#1d8127\",\n                          },\n                        },\n                        \"success\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#0a2e0e\",\n                          \"light\": \"#86e490\",\n                          \"main\": \"#1d8127\",\n                        },\n                        \"text\": {\n                          \"primary\": \"#333333\",\n                          \"secondary\": \"#666\",\n                        },\n                        \"tonalOffset\": 0.2,\n                        \"warning\": {\n                          \"contrastText\": \"#ffffff\",\n                          \"dark\": \"#996300\",\n                          \"light\": \"#ffc966\",\n                          \"main\": \"#ffa500\",\n                        },\n                      },\n                      \"extensionsHook\": undefined,\n                      \"fab\": {\n                        \"backgroundColor\": \"#f2f2f2\",\n                        \"color\": \"#0065FB\",\n                      },\n                      \"logo\": {\n                        \"gutter\": \"2px\",\n                        \"maxHeight\": \"260px\",\n                        \"maxWidth\": \"260px\",\n                      },\n                      \"rightPanel\": {\n                        \"backgroundColor\": \"#263238\",\n                        \"servers\": {\n                          \"overlay\": {\n                            \"backgroundColor\": \"#fafafa\",\n                            \"textColor\": \"#263238\",\n                          },\n                          \"url\": {\n                            \"backgroundColor\": \"#fff\",\n                          },\n                        },\n                        \"textColor\": \"#ffffff\",\n                        \"width\": \"40%\",\n                      },\n                      \"schema\": {\n                        \"arrow\": {\n                          \"color\": \"#666\",\n                          \"size\": \"1.1em\",\n                        },\n                        \"defaultDetailsWidth\": \"75%\",\n                        \"labelsTextSize\": \"0.9em\",\n                        \"linesColor\": \"#7c7cbb\",\n                        \"nestedBackground\": \"#fafafa\",\n                        \"nestingSpacing\": \"1em\",\n                        \"requireLabelColor\": \"#d41f1c\",\n                        \"typeNameColor\": \"#666\",\n                        \"typeTitleColor\": \"#666\",\n                      },\n                      \"sidebar\": {\n                        \"activeTextColor\": \"#32329f\",\n                        \"arrow\": {\n                          \"color\": \"#333333\",\n                          \"size\": \"1.5em\",\n                        },\n                        \"backgroundColor\": \"#fafafa\",\n                        \"groupItems\": {\n                          \"activeBackgroundColor\": \"#e1e1e1\",\n                          \"activeTextColor\": \"#32329f\",\n                          \"textTransform\": \"uppercase\",\n                        },\n                        \"level1Items\": {\n                          \"activeBackgroundColor\": \"#ededed\",\n                          \"activeTextColor\": \"#32329f\",\n                          \"textTransform\": \"none\",\n                        },\n                        \"textColor\": \"#333333\",\n                        \"width\": \"260px\",\n                      },\n                      \"spacing\": {\n                        \"sectionHorizontal\": 40,\n                        \"sectionVertical\": 40,\n                        \"unit\": 5,\n                      },\n                      \"typography\": {\n                        \"code\": {\n                          \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                          \"color\": \"#e53935\",\n                          \"fontFamily\": \"Courier, monospace\",\n                          \"fontSize\": \"13px\",\n                          \"fontWeight\": \"400\",\n                          \"lineHeight\": \"1.5em\",\n                          \"wrap\": false,\n                        },\n                        \"fontFamily\": \"Roboto, sans-serif\",\n                        \"fontSize\": \"14px\",\n                        \"fontWeightBold\": \"600\",\n                        \"fontWeightLight\": \"300\",\n                        \"fontWeightRegular\": \"400\",\n                        \"headings\": {\n                          \"fontFamily\": \"Montserrat, sans-serif\",\n                          \"fontWeight\": \"400\",\n                          \"lineHeight\": \"1.6em\",\n                        },\n                        \"lineHeight\": \"1.5em\",\n                        \"links\": {\n                          \"color\": \"#32329f\",\n                          \"hover\": \"#6868cf\",\n                          \"hoverTextDecoration\": \"auto\",\n                          \"textDecoration\": \"auto\",\n                          \"visited\": \"#32329f\",\n                        },\n                        \"optimizeSpeed\": true,\n                        \"smoothing\": \"antialiased\",\n                      },\n                    },\n                    \"unstable_ignoreMimeParameters\": false,\n                  },\n                  \"pattern\": undefined,\n                  \"pointer\": \"#/components/schemas/Dog/properties/type\",\n                  \"rawSchema\": {\n                    \"default\": undefined,\n                    \"type\": \"string\",\n                    \"x-refsStack\": [\n                      \"#/components/schemas/Dog\",\n                      \"#/components/schemas/Pet\",\n                    ],\n                  },\n                  \"readOnly\": false,\n                  \"refsStack\": [\n                    \"#/components/schemas/Dog\",\n                    \"#/components/schemas/Dog\",\n                    \"#/components/schemas/Pet\",\n                    \"#/components/schemas/Dog\",\n                    \"#/components/schemas/Pet\",\n                    \"#/components/schemas/Dog/properties/type\",\n                  ],\n                  \"schema\": {\n                    \"default\": undefined,\n                    \"type\": \"string\",\n                    \"x-refsStack\": [\n                      \"#/components/schemas/Dog\",\n                      \"#/components/schemas/Pet\",\n                    ],\n                  },\n                  \"title\": \"\",\n                  \"type\": \"string\",\n                  \"typePrefix\": \"\",\n                  \"writeOnly\": false,\n                  \"x-enumDescriptions\": undefined,\n                },\n              },\n            ],\n            \"format\": undefined,\n            \"isCircular\": false,\n            \"isPrimitive\": false,\n            \"maxItems\": undefined,\n            \"minItems\": undefined,\n            \"options\": RedocNormalizedOptions {\n              \"allowedMdComponents\": {},\n              \"disableSearch\": false,\n              \"downloadDefinitionUrl\": undefined,\n              \"downloadFileName\": undefined,\n              \"downloadUrls\": undefined,\n              \"enumSkipQuotes\": false,\n              \"expandDefaultServerVariables\": false,\n              \"expandResponses\": {},\n              \"expandSingleSchemaField\": false,\n              \"generatedSamplesMaxDepth\": 10,\n              \"hideDownloadButtons\": false,\n              \"hideFab\": false,\n              \"hideHostname\": false,\n              \"hidePropertiesPrefix\": true,\n              \"hideRequestPayloadSample\": false,\n              \"hideSchemaPattern\": false,\n              \"hideSchemaTitles\": false,\n              \"hideSecuritySection\": false,\n              \"hideSingleRequestSampleTab\": false,\n              \"ignoreNamedSchemas\": Set {},\n              \"jsonSamplesExpandLevel\": 2,\n              \"maxDisplayedEnumValues\": undefined,\n              \"menuToggle\": true,\n              \"minCharacterLengthToInitSearch\": 3,\n              \"nativeScrollbars\": false,\n              \"nonce\": undefined,\n              \"onlyRequiredInSamples\": false,\n              \"pathInMiddlePanel\": false,\n              \"payloadSampleIdx\": 0,\n              \"sanitize\": false,\n              \"schemaDefinitionsTagName\": undefined,\n              \"schemasExpansionLevel\": 0,\n              \"scrollYOffset\": [Function],\n              \"showExtensions\": false,\n              \"showObjectSchemaExamples\": false,\n              \"showSecuritySchemeType\": false,\n              \"showWebhookVerb\": false,\n              \"sideNavStyle\": \"summary-only\",\n              \"simpleOneOfTypeLabel\": false,\n              \"sortEnumValuesAlphabetically\": false,\n              \"sortOperationsAlphabetically\": false,\n              \"sortPropsAlphabetically\": false,\n              \"sortRequiredPropsFirst\": false,\n              \"sortTagsAlphabetically\": false,\n              \"theme\": {\n                \"breakpoints\": {\n                  \"large\": \"105rem\",\n                  \"medium\": \"75rem\",\n                  \"small\": \"50rem\",\n                },\n                \"codeBlock\": {\n                  \"backgroundColor\": \"#11171a\",\n                },\n                \"colors\": {\n                  \"border\": {\n                    \"dark\": \"rgba(0,0,0, 0.1)\",\n                    \"light\": \"#ffffff\",\n                  },\n                  \"error\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#7a1210\",\n                    \"light\": \"#eb6d6b\",\n                    \"main\": \"#d41f1c\",\n                  },\n                  \"gray\": {\n                    \"100\": \"#F5F5F5\",\n                    \"50\": \"#FAFAFA\",\n                  },\n                  \"http\": {\n                    \"basic\": \"#707070\",\n                    \"delete\": \"#cc3333\",\n                    \"get\": \"#2F8132\",\n                    \"head\": \"#A23DAD\",\n                    \"link\": \"#07818F\",\n                    \"options\": \"#947014\",\n                    \"patch\": \"#bf581d\",\n                    \"post\": \"#186FAF\",\n                    \"put\": \"#95507c\",\n                  },\n                  \"primary\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#1a1a51\",\n                    \"light\": \"#6868cf\",\n                    \"main\": \"#32329f\",\n                  },\n                  \"responses\": {\n                    \"error\": {\n                      \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                      \"color\": \"#d41f1c\",\n                      \"tabTextColor\": \"#d41f1c\",\n                    },\n                    \"info\": {\n                      \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                      \"color\": \"#87ceeb\",\n                      \"tabTextColor\": \"#87ceeb\",\n                    },\n                    \"redirect\": {\n                      \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                      \"color\": \"#ffa500\",\n                      \"tabTextColor\": \"#ffa500\",\n                    },\n                    \"success\": {\n                      \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                      \"color\": \"#1d8127\",\n                      \"tabTextColor\": \"#1d8127\",\n                    },\n                  },\n                  \"success\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#0a2e0e\",\n                    \"light\": \"#86e490\",\n                    \"main\": \"#1d8127\",\n                  },\n                  \"text\": {\n                    \"primary\": \"#333333\",\n                    \"secondary\": \"#666\",\n                  },\n                  \"tonalOffset\": 0.2,\n                  \"warning\": {\n                    \"contrastText\": \"#ffffff\",\n                    \"dark\": \"#996300\",\n                    \"light\": \"#ffc966\",\n                    \"main\": \"#ffa500\",\n                  },\n                },\n                \"extensionsHook\": undefined,\n                \"fab\": {\n                  \"backgroundColor\": \"#f2f2f2\",\n                  \"color\": \"#0065FB\",\n                },\n                \"logo\": {\n                  \"gutter\": \"2px\",\n                  \"maxHeight\": \"260px\",\n                  \"maxWidth\": \"260px\",\n                },\n                \"rightPanel\": {\n                  \"backgroundColor\": \"#263238\",\n                  \"servers\": {\n                    \"overlay\": {\n                      \"backgroundColor\": \"#fafafa\",\n                      \"textColor\": \"#263238\",\n                    },\n                    \"url\": {\n                      \"backgroundColor\": \"#fff\",\n                    },\n                  },\n                  \"textColor\": \"#ffffff\",\n                  \"width\": \"40%\",\n                },\n                \"schema\": {\n                  \"arrow\": {\n                    \"color\": \"#666\",\n                    \"size\": \"1.1em\",\n                  },\n                  \"defaultDetailsWidth\": \"75%\",\n                  \"labelsTextSize\": \"0.9em\",\n                  \"linesColor\": \"#7c7cbb\",\n                  \"nestedBackground\": \"#fafafa\",\n                  \"nestingSpacing\": \"1em\",\n                  \"requireLabelColor\": \"#d41f1c\",\n                  \"typeNameColor\": \"#666\",\n                  \"typeTitleColor\": \"#666\",\n                },\n                \"sidebar\": {\n                  \"activeTextColor\": \"#32329f\",\n                  \"arrow\": {\n                    \"color\": \"#333333\",\n                    \"size\": \"1.5em\",\n                  },\n                  \"backgroundColor\": \"#fafafa\",\n                  \"groupItems\": {\n                    \"activeBackgroundColor\": \"#e1e1e1\",\n                    \"activeTextColor\": \"#32329f\",\n                    \"textTransform\": \"uppercase\",\n                  },\n                  \"level1Items\": {\n                    \"activeBackgroundColor\": \"#ededed\",\n                    \"activeTextColor\": \"#32329f\",\n                    \"textTransform\": \"none\",\n                  },\n                  \"textColor\": \"#333333\",\n                  \"width\": \"260px\",\n                },\n                \"spacing\": {\n                  \"sectionHorizontal\": 40,\n                  \"sectionVertical\": 40,\n                  \"unit\": 5,\n                },\n                \"typography\": {\n                  \"code\": {\n                    \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                    \"color\": \"#e53935\",\n                    \"fontFamily\": \"Courier, monospace\",\n                    \"fontSize\": \"13px\",\n                    \"fontWeight\": \"400\",\n                    \"lineHeight\": \"1.5em\",\n                    \"wrap\": false,\n                  },\n                  \"fontFamily\": \"Roboto, sans-serif\",\n                  \"fontSize\": \"14px\",\n                  \"fontWeightBold\": \"600\",\n                  \"fontWeightLight\": \"300\",\n                  \"fontWeightRegular\": \"400\",\n                  \"headings\": {\n                    \"fontFamily\": \"Montserrat, sans-serif\",\n                    \"fontWeight\": \"400\",\n                    \"lineHeight\": \"1.6em\",\n                  },\n                  \"lineHeight\": \"1.5em\",\n                  \"links\": {\n                    \"color\": \"#32329f\",\n                    \"hover\": \"#6868cf\",\n                    \"hoverTextDecoration\": \"auto\",\n                    \"textDecoration\": \"auto\",\n                    \"visited\": \"#32329f\",\n                  },\n                  \"optimizeSpeed\": true,\n                  \"smoothing\": \"antialiased\",\n                },\n              },\n              \"unstable_ignoreMimeParameters\": false,\n            },\n            \"pattern\": undefined,\n            \"pointer\": \"#/components/schemas/Dog\",\n            \"rawSchema\": {\n              \"allOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n              ],\n              \"properties\": {\n                \"packSize\": {\n                  \"type\": \"number\",\n                },\n              },\n              \"type\": \"object\",\n            },\n            \"readOnly\": false,\n            \"refsStack\": [\n              \"#/components/schemas/Dog\",\n            ],\n            \"schema\": {\n              \"allOf\": undefined,\n              \"description\": undefined,\n              \"discriminator\": {\n                \"propertyName\": \"type\",\n              },\n              \"properties\": {\n                \"packSize\": {\n                  \"type\": \"number\",\n                },\n                \"type\": {\n                  \"type\": \"string\",\n                  \"x-refsStack\": [\n                    \"#/components/schemas/Dog\",\n                    \"#/components/schemas/Pet\",\n                  ],\n                },\n              },\n              \"readOnly\": undefined,\n              \"required\": [\n                \"type\",\n              ],\n              \"title\": \"Dog\",\n              \"type\": \"object\",\n              \"writeOnly\": undefined,\n              \"x-circular-ref\": undefined,\n              \"x-parentRefs\": [\n                \"#/components/schemas/Pet\",\n              ],\n            },\n            \"title\": \"Dog\",\n            \"type\": \"object\",\n            \"typePrefix\": \"\",\n            \"writeOnly\": false,\n            \"x-enumDescriptions\": undefined,\n          },\n          SchemaModel {\n            \"activeOneOf\": 0,\n            \"const\": \"\",\n            \"constraints\": [],\n            \"contentEncoding\": undefined,\n            \"contentMediaType\": undefined,\n            \"default\": undefined,\n            \"deprecated\": false,\n            \"description\": \"\",\n            \"displayFormat\": undefined,\n            \"displayType\": \"object\",\n            \"enum\": [],\n            \"example\": undefined,\n            \"examples\": undefined,\n            \"externalDocs\": undefined,\n            \"fields\": [\n              FieldModel {\n                \"const\": \"\",\n                \"deprecated\": false,\n                \"description\": \"\",\n                \"example\": undefined,\n                \"expanded\": undefined,\n                \"explode\": false,\n                \"in\": undefined,\n                \"kind\": \"field\",\n                \"name\": \"type\",\n                \"required\": true,\n                \"schema\": SchemaModel {\n                  \"activeOneOf\": 0,\n                  \"const\": \"\",\n                  \"constraints\": [],\n                  \"contentEncoding\": undefined,\n                  \"contentMediaType\": undefined,\n                  \"default\": undefined,\n                  \"deprecated\": false,\n                  \"description\": \"\",\n                  \"displayFormat\": undefined,\n                  \"displayType\": \"string\",\n                  \"enum\": [],\n                  \"example\": undefined,\n                  \"examples\": undefined,\n                  \"externalDocs\": undefined,\n                  \"format\": undefined,\n                  \"isCircular\": false,\n                  \"isPrimitive\": true,\n                  \"maxItems\": undefined,\n                  \"minItems\": undefined,\n                  \"options\": RedocNormalizedOptions {\n                    \"allowedMdComponents\": {},\n                    \"disableSearch\": false,\n                    \"downloadDefinitionUrl\": undefined,\n                    \"downloadFileName\": undefined,\n                    \"downloadUrls\": undefined,\n                    \"enumSkipQuotes\": false,\n                    \"expandDefaultServerVariables\": false,\n                    \"expandResponses\": {},\n                    \"expandSingleSchemaField\": false,\n                    \"generatedSamplesMaxDepth\": 10,\n                    \"hideDownloadButtons\": false,\n                    \"hideFab\": false,\n                    \"hideHostname\": false,\n                    \"hidePropertiesPrefix\": true,\n                    \"hideRequestPayloadSample\": false,\n                    \"hideSchemaPattern\": false,\n                    \"hideSchemaTitles\": false,\n                    \"hideSecuritySection\": false,\n                    \"hideSingleRequestSampleTab\": false,\n                    \"ignoreNamedSchemas\": Set {},\n                    \"jsonSamplesExpandLevel\": 2,\n                    \"maxDisplayedEnumValues\": undefined,\n                    \"menuToggle\": true,\n                    \"minCharacterLengthToInitSearch\": 3,\n                    \"nativeScrollbars\": false,\n                    \"nonce\": undefined,\n                    \"onlyRequiredInSamples\": false,\n                    \"pathInMiddlePanel\": false,\n                    \"payloadSampleIdx\": 0,\n                    \"sanitize\": false,\n                    \"schemaDefinitionsTagName\": undefined,\n                    \"schemasExpansionLevel\": 0,\n                    \"scrollYOffset\": [Function],\n                    \"showExtensions\": false,\n                    \"showObjectSchemaExamples\": false,\n                    \"showSecuritySchemeType\": false,\n                    \"showWebhookVerb\": false,\n                    \"sideNavStyle\": \"summary-only\",\n                    \"simpleOneOfTypeLabel\": false,\n                    \"sortEnumValuesAlphabetically\": false,\n                    \"sortOperationsAlphabetically\": false,\n                    \"sortPropsAlphabetically\": false,\n                    \"sortRequiredPropsFirst\": false,\n                    \"sortTagsAlphabetically\": false,\n                    \"theme\": {\n                      \"breakpoints\": {\n                        \"large\": \"105rem\",\n                        \"medium\": \"75rem\",\n                        \"small\": \"50rem\",\n                      },\n                      \"codeBlock\": {\n                        \"backgroundColor\": \"#11171a\",\n                      },\n                      \"colors\": {\n                        \"border\": {\n                          \"dark\": \"rgba(0,0,0, 0.1)\",\n                          \"light\": \"#ffffff\",\n                        },\n                        \"error\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#7a1210\",\n                          \"light\": \"#eb6d6b\",\n                          \"main\": \"#d41f1c\",\n                        },\n                        \"gray\": {\n                          \"100\": \"#F5F5F5\",\n                          \"50\": \"#FAFAFA\",\n                        },\n                        \"http\": {\n                          \"basic\": \"#707070\",\n                          \"delete\": \"#cc3333\",\n                          \"get\": \"#2F8132\",\n                          \"head\": \"#A23DAD\",\n                          \"link\": \"#07818F\",\n                          \"options\": \"#947014\",\n                          \"patch\": \"#bf581d\",\n                          \"post\": \"#186FAF\",\n                          \"put\": \"#95507c\",\n                        },\n                        \"primary\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#1a1a51\",\n                          \"light\": \"#6868cf\",\n                          \"main\": \"#32329f\",\n                        },\n                        \"responses\": {\n                          \"error\": {\n                            \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                            \"color\": \"#d41f1c\",\n                            \"tabTextColor\": \"#d41f1c\",\n                          },\n                          \"info\": {\n                            \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                            \"color\": \"#87ceeb\",\n                            \"tabTextColor\": \"#87ceeb\",\n                          },\n                          \"redirect\": {\n                            \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                            \"color\": \"#ffa500\",\n                            \"tabTextColor\": \"#ffa500\",\n                          },\n                          \"success\": {\n                            \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                            \"color\": \"#1d8127\",\n                            \"tabTextColor\": \"#1d8127\",\n                          },\n                        },\n                        \"success\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#0a2e0e\",\n                          \"light\": \"#86e490\",\n                          \"main\": \"#1d8127\",\n                        },\n                        \"text\": {\n                          \"primary\": \"#333333\",\n                          \"secondary\": \"#666\",\n                        },\n                        \"tonalOffset\": 0.2,\n                        \"warning\": {\n                          \"contrastText\": \"#ffffff\",\n                          \"dark\": \"#996300\",\n                          \"light\": \"#ffc966\",\n                          \"main\": \"#ffa500\",\n                        },\n                      },\n                      \"extensionsHook\": undefined,\n                      \"fab\": {\n                        \"backgroundColor\": \"#f2f2f2\",\n                        \"color\": \"#0065FB\",\n                      },\n                      \"logo\": {\n                        \"gutter\": \"2px\",\n                        \"maxHeight\": \"260px\",\n                        \"maxWidth\": \"260px\",\n                      },\n                      \"rightPanel\": {\n                        \"backgroundColor\": \"#263238\",\n                        \"servers\": {\n                          \"overlay\": {\n                            \"backgroundColor\": \"#fafafa\",\n                            \"textColor\": \"#263238\",\n                          },\n                          \"url\": {\n                            \"backgroundColor\": \"#fff\",\n                          },\n                        },\n                        \"textColor\": \"#ffffff\",\n                        \"width\": \"40%\",\n                      },\n                      \"schema\": {\n                        \"arrow\": {\n                          \"color\": \"#666\",\n                          \"size\": \"1.1em\",\n                        },\n                        \"defaultDetailsWidth\": \"75%\",\n                        \"labelsTextSize\": \"0.9em\",\n                        \"linesColor\": \"#7c7cbb\",\n                        \"nestedBackground\": \"#fafafa\",\n                        \"nestingSpacing\": \"1em\",\n                        \"requireLabelColor\": \"#d41f1c\",\n                        \"typeNameColor\": \"#666\",\n                        \"typeTitleColor\": \"#666\",\n                      },\n                      \"sidebar\": {\n                        \"activeTextColor\": \"#32329f\",\n                        \"arrow\": {\n                          \"color\": \"#333333\",\n                          \"size\": \"1.5em\",\n                        },\n                        \"backgroundColor\": \"#fafafa\",\n                        \"groupItems\": {\n                          \"activeBackgroundColor\": \"#e1e1e1\",\n                          \"activeTextColor\": \"#32329f\",\n                          \"textTransform\": \"uppercase\",\n                        },\n                        \"level1Items\": {\n                          \"activeBackgroundColor\": \"#ededed\",\n                          \"activeTextColor\": \"#32329f\",\n                          \"textTransform\": \"none\",\n                        },\n                        \"textColor\": \"#333333\",\n                        \"width\": \"260px\",\n                      },\n                      \"spacing\": {\n                        \"sectionHorizontal\": 40,\n                        \"sectionVertical\": 40,\n                        \"unit\": 5,\n                      },\n                      \"typography\": {\n                        \"code\": {\n                          \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                          \"color\": \"#e53935\",\n                          \"fontFamily\": \"Courier, monospace\",\n                          \"fontSize\": \"13px\",\n                          \"fontWeight\": \"400\",\n                          \"lineHeight\": \"1.5em\",\n                          \"wrap\": false,\n                        },\n                        \"fontFamily\": \"Roboto, sans-serif\",\n                        \"fontSize\": \"14px\",\n                        \"fontWeightBold\": \"600\",\n                        \"fontWeightLight\": \"300\",\n                        \"fontWeightRegular\": \"400\",\n                        \"headings\": {\n                          \"fontFamily\": \"Montserrat, sans-serif\",\n                          \"fontWeight\": \"400\",\n                          \"lineHeight\": \"1.6em\",\n                        },\n                        \"lineHeight\": \"1.5em\",\n                        \"links\": {\n                          \"color\": \"#32329f\",\n                          \"hover\": \"#6868cf\",\n                          \"hoverTextDecoration\": \"auto\",\n                          \"textDecoration\": \"auto\",\n                          \"visited\": \"#32329f\",\n                        },\n                        \"optimizeSpeed\": true,\n                        \"smoothing\": \"antialiased\",\n                      },\n                    },\n                    \"unstable_ignoreMimeParameters\": false,\n                  },\n                  \"pattern\": undefined,\n                  \"pointer\": \"#/components/schemas/Cat/properties/type\",\n                  \"rawSchema\": {\n                    \"default\": undefined,\n                    \"type\": \"string\",\n                    \"x-refsStack\": [\n                      \"#/components/schemas/Cat\",\n                      \"#/components/schemas/Pet\",\n                    ],\n                  },\n                  \"readOnly\": false,\n                  \"refsStack\": [\n                    \"#/components/schemas/Cat\",\n                    \"#/components/schemas/Cat\",\n                    \"#/components/schemas/Pet\",\n                    \"#/components/schemas/Cat\",\n                    \"#/components/schemas/Pet\",\n                    \"#/components/schemas/Cat/properties/type\",\n                  ],\n                  \"schema\": {\n                    \"default\": undefined,\n                    \"type\": \"string\",\n                    \"x-refsStack\": [\n                      \"#/components/schemas/Cat\",\n                      \"#/components/schemas/Pet\",\n                    ],\n                  },\n                  \"title\": \"\",\n                  \"type\": \"string\",\n                  \"typePrefix\": \"\",\n                  \"writeOnly\": false,\n                  \"x-enumDescriptions\": undefined,\n                },\n              },\n              FieldModel {\n                \"const\": \"\",\n                \"deprecated\": false,\n                \"description\": \"\",\n                \"example\": undefined,\n                \"expanded\": undefined,\n                \"explode\": false,\n                \"in\": undefined,\n                \"kind\": \"field\",\n                \"name\": \"packSize\",\n                \"required\": false,\n                \"schema\": SchemaModel {\n                  \"activeOneOf\": 0,\n                  \"const\": \"\",\n                  \"constraints\": [],\n                  \"contentEncoding\": undefined,\n                  \"contentMediaType\": undefined,\n                  \"default\": undefined,\n                  \"deprecated\": false,\n                  \"description\": \"\",\n                  \"displayFormat\": undefined,\n                  \"displayType\": \"number\",\n                  \"enum\": [],\n                  \"example\": undefined,\n                  \"examples\": undefined,\n                  \"externalDocs\": undefined,\n                  \"format\": undefined,\n                  \"isCircular\": false,\n                  \"isPrimitive\": true,\n                  \"maxItems\": undefined,\n                  \"minItems\": undefined,\n                  \"options\": RedocNormalizedOptions {\n                    \"allowedMdComponents\": {},\n                    \"disableSearch\": false,\n                    \"downloadDefinitionUrl\": undefined,\n                    \"downloadFileName\": undefined,\n                    \"downloadUrls\": undefined,\n                    \"enumSkipQuotes\": false,\n                    \"expandDefaultServerVariables\": false,\n                    \"expandResponses\": {},\n                    \"expandSingleSchemaField\": false,\n                    \"generatedSamplesMaxDepth\": 10,\n                    \"hideDownloadButtons\": false,\n                    \"hideFab\": false,\n                    \"hideHostname\": false,\n                    \"hidePropertiesPrefix\": true,\n                    \"hideRequestPayloadSample\": false,\n                    \"hideSchemaPattern\": false,\n                    \"hideSchemaTitles\": false,\n                    \"hideSecuritySection\": false,\n                    \"hideSingleRequestSampleTab\": false,\n                    \"ignoreNamedSchemas\": Set {},\n                    \"jsonSamplesExpandLevel\": 2,\n                    \"maxDisplayedEnumValues\": undefined,\n                    \"menuToggle\": true,\n                    \"minCharacterLengthToInitSearch\": 3,\n                    \"nativeScrollbars\": false,\n                    \"nonce\": undefined,\n                    \"onlyRequiredInSamples\": false,\n                    \"pathInMiddlePanel\": false,\n                    \"payloadSampleIdx\": 0,\n                    \"sanitize\": false,\n                    \"schemaDefinitionsTagName\": undefined,\n                    \"schemasExpansionLevel\": 0,\n                    \"scrollYOffset\": [Function],\n                    \"showExtensions\": false,\n                    \"showObjectSchemaExamples\": false,\n                    \"showSecuritySchemeType\": false,\n                    \"showWebhookVerb\": false,\n                    \"sideNavStyle\": \"summary-only\",\n                    \"simpleOneOfTypeLabel\": false,\n                    \"sortEnumValuesAlphabetically\": false,\n                    \"sortOperationsAlphabetically\": false,\n                    \"sortPropsAlphabetically\": false,\n                    \"sortRequiredPropsFirst\": false,\n                    \"sortTagsAlphabetically\": false,\n                    \"theme\": {\n                      \"breakpoints\": {\n                        \"large\": \"105rem\",\n                        \"medium\": \"75rem\",\n                        \"small\": \"50rem\",\n                      },\n                      \"codeBlock\": {\n                        \"backgroundColor\": \"#11171a\",\n                      },\n                      \"colors\": {\n                        \"border\": {\n                          \"dark\": \"rgba(0,0,0, 0.1)\",\n                          \"light\": \"#ffffff\",\n                        },\n                        \"error\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#7a1210\",\n                          \"light\": \"#eb6d6b\",\n                          \"main\": \"#d41f1c\",\n                        },\n                        \"gray\": {\n                          \"100\": \"#F5F5F5\",\n                          \"50\": \"#FAFAFA\",\n                        },\n                        \"http\": {\n                          \"basic\": \"#707070\",\n                          \"delete\": \"#cc3333\",\n                          \"get\": \"#2F8132\",\n                          \"head\": \"#A23DAD\",\n                          \"link\": \"#07818F\",\n                          \"options\": \"#947014\",\n                          \"patch\": \"#bf581d\",\n                          \"post\": \"#186FAF\",\n                          \"put\": \"#95507c\",\n                        },\n                        \"primary\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#1a1a51\",\n                          \"light\": \"#6868cf\",\n                          \"main\": \"#32329f\",\n                        },\n                        \"responses\": {\n                          \"error\": {\n                            \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                            \"color\": \"#d41f1c\",\n                            \"tabTextColor\": \"#d41f1c\",\n                          },\n                          \"info\": {\n                            \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                            \"color\": \"#87ceeb\",\n                            \"tabTextColor\": \"#87ceeb\",\n                          },\n                          \"redirect\": {\n                            \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                            \"color\": \"#ffa500\",\n                            \"tabTextColor\": \"#ffa500\",\n                          },\n                          \"success\": {\n                            \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                            \"color\": \"#1d8127\",\n                            \"tabTextColor\": \"#1d8127\",\n                          },\n                        },\n                        \"success\": {\n                          \"contrastText\": \"#fff\",\n                          \"dark\": \"#0a2e0e\",\n                          \"light\": \"#86e490\",\n                          \"main\": \"#1d8127\",\n                        },\n                        \"text\": {\n                          \"primary\": \"#333333\",\n                          \"secondary\": \"#666\",\n                        },\n                        \"tonalOffset\": 0.2,\n                        \"warning\": {\n                          \"contrastText\": \"#ffffff\",\n                          \"dark\": \"#996300\",\n                          \"light\": \"#ffc966\",\n                          \"main\": \"#ffa500\",\n                        },\n                      },\n                      \"extensionsHook\": undefined,\n                      \"fab\": {\n                        \"backgroundColor\": \"#f2f2f2\",\n                        \"color\": \"#0065FB\",\n                      },\n                      \"logo\": {\n                        \"gutter\": \"2px\",\n                        \"maxHeight\": \"260px\",\n                        \"maxWidth\": \"260px\",\n                      },\n                      \"rightPanel\": {\n                        \"backgroundColor\": \"#263238\",\n                        \"servers\": {\n                          \"overlay\": {\n                            \"backgroundColor\": \"#fafafa\",\n                            \"textColor\": \"#263238\",\n                          },\n                          \"url\": {\n                            \"backgroundColor\": \"#fff\",\n                          },\n                        },\n                        \"textColor\": \"#ffffff\",\n                        \"width\": \"40%\",\n                      },\n                      \"schema\": {\n                        \"arrow\": {\n                          \"color\": \"#666\",\n                          \"size\": \"1.1em\",\n                        },\n                        \"defaultDetailsWidth\": \"75%\",\n                        \"labelsTextSize\": \"0.9em\",\n                        \"linesColor\": \"#7c7cbb\",\n                        \"nestedBackground\": \"#fafafa\",\n                        \"nestingSpacing\": \"1em\",\n                        \"requireLabelColor\": \"#d41f1c\",\n                        \"typeNameColor\": \"#666\",\n                        \"typeTitleColor\": \"#666\",\n                      },\n                      \"sidebar\": {\n                        \"activeTextColor\": \"#32329f\",\n                        \"arrow\": {\n                          \"color\": \"#333333\",\n                          \"size\": \"1.5em\",\n                        },\n                        \"backgroundColor\": \"#fafafa\",\n                        \"groupItems\": {\n                          \"activeBackgroundColor\": \"#e1e1e1\",\n                          \"activeTextColor\": \"#32329f\",\n                          \"textTransform\": \"uppercase\",\n                        },\n                        \"level1Items\": {\n                          \"activeBackgroundColor\": \"#ededed\",\n                          \"activeTextColor\": \"#32329f\",\n                          \"textTransform\": \"none\",\n                        },\n                        \"textColor\": \"#333333\",\n                        \"width\": \"260px\",\n                      },\n                      \"spacing\": {\n                        \"sectionHorizontal\": 40,\n                        \"sectionVertical\": 40,\n                        \"unit\": 5,\n                      },\n                      \"typography\": {\n                        \"code\": {\n                          \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                          \"color\": \"#e53935\",\n                          \"fontFamily\": \"Courier, monospace\",\n                          \"fontSize\": \"13px\",\n                          \"fontWeight\": \"400\",\n                          \"lineHeight\": \"1.5em\",\n                          \"wrap\": false,\n                        },\n                        \"fontFamily\": \"Roboto, sans-serif\",\n                        \"fontSize\": \"14px\",\n                        \"fontWeightBold\": \"600\",\n                        \"fontWeightLight\": \"300\",\n                        \"fontWeightRegular\": \"400\",\n                        \"headings\": {\n                          \"fontFamily\": \"Montserrat, sans-serif\",\n                          \"fontWeight\": \"400\",\n                          \"lineHeight\": \"1.6em\",\n                        },\n                        \"lineHeight\": \"1.5em\",\n                        \"links\": {\n                          \"color\": \"#32329f\",\n                          \"hover\": \"#6868cf\",\n                          \"hoverTextDecoration\": \"auto\",\n                          \"textDecoration\": \"auto\",\n                          \"visited\": \"#32329f\",\n                        },\n                        \"optimizeSpeed\": true,\n                        \"smoothing\": \"antialiased\",\n                      },\n                    },\n                    \"unstable_ignoreMimeParameters\": false,\n                  },\n                  \"pattern\": undefined,\n                  \"pointer\": \"#/components/schemas/Cat/properties/packSize\",\n                  \"rawSchema\": {\n                    \"default\": undefined,\n                    \"type\": \"number\",\n                    \"x-refsStack\": [\n                      \"#/components/schemas/Cat\",\n                    ],\n                  },\n                  \"readOnly\": false,\n                  \"refsStack\": [\n                    \"#/components/schemas/Cat\",\n                    \"#/components/schemas/Cat\",\n                    \"#/components/schemas/Cat\",\n                    \"#/components/schemas/Cat/properties/packSize\",\n                  ],\n                  \"schema\": {\n                    \"default\": undefined,\n                    \"type\": \"number\",\n                    \"x-refsStack\": [\n                      \"#/components/schemas/Cat\",\n                    ],\n                  },\n                  \"title\": \"\",\n                  \"type\": \"number\",\n                  \"typePrefix\": \"\",\n                  \"writeOnly\": false,\n                  \"x-enumDescriptions\": undefined,\n                },\n              },\n            ],\n            \"format\": undefined,\n            \"isCircular\": false,\n            \"isPrimitive\": false,\n            \"maxItems\": undefined,\n            \"minItems\": undefined,\n            \"options\": RedocNormalizedOptions {\n              \"allowedMdComponents\": {},\n              \"disableSearch\": false,\n              \"downloadDefinitionUrl\": undefined,\n              \"downloadFileName\": undefined,\n              \"downloadUrls\": undefined,\n              \"enumSkipQuotes\": false,\n              \"expandDefaultServerVariables\": false,\n              \"expandResponses\": {},\n              \"expandSingleSchemaField\": false,\n              \"generatedSamplesMaxDepth\": 10,\n              \"hideDownloadButtons\": false,\n              \"hideFab\": false,\n              \"hideHostname\": false,\n              \"hidePropertiesPrefix\": true,\n              \"hideRequestPayloadSample\": false,\n              \"hideSchemaPattern\": false,\n              \"hideSchemaTitles\": false,\n              \"hideSecuritySection\": false,\n              \"hideSingleRequestSampleTab\": false,\n              \"ignoreNamedSchemas\": Set {},\n              \"jsonSamplesExpandLevel\": 2,\n              \"maxDisplayedEnumValues\": undefined,\n              \"menuToggle\": true,\n              \"minCharacterLengthToInitSearch\": 3,\n              \"nativeScrollbars\": false,\n              \"nonce\": undefined,\n              \"onlyRequiredInSamples\": false,\n              \"pathInMiddlePanel\": false,\n              \"payloadSampleIdx\": 0,\n              \"sanitize\": false,\n              \"schemaDefinitionsTagName\": undefined,\n              \"schemasExpansionLevel\": 0,\n              \"scrollYOffset\": [Function],\n              \"showExtensions\": false,\n              \"showObjectSchemaExamples\": false,\n              \"showSecuritySchemeType\": false,\n              \"showWebhookVerb\": false,\n              \"sideNavStyle\": \"summary-only\",\n              \"simpleOneOfTypeLabel\": false,\n              \"sortEnumValuesAlphabetically\": false,\n              \"sortOperationsAlphabetically\": false,\n              \"sortPropsAlphabetically\": false,\n              \"sortRequiredPropsFirst\": false,\n              \"sortTagsAlphabetically\": false,\n              \"theme\": {\n                \"breakpoints\": {\n                  \"large\": \"105rem\",\n                  \"medium\": \"75rem\",\n                  \"small\": \"50rem\",\n                },\n                \"codeBlock\": {\n                  \"backgroundColor\": \"#11171a\",\n                },\n                \"colors\": {\n                  \"border\": {\n                    \"dark\": \"rgba(0,0,0, 0.1)\",\n                    \"light\": \"#ffffff\",\n                  },\n                  \"error\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#7a1210\",\n                    \"light\": \"#eb6d6b\",\n                    \"main\": \"#d41f1c\",\n                  },\n                  \"gray\": {\n                    \"100\": \"#F5F5F5\",\n                    \"50\": \"#FAFAFA\",\n                  },\n                  \"http\": {\n                    \"basic\": \"#707070\",\n                    \"delete\": \"#cc3333\",\n                    \"get\": \"#2F8132\",\n                    \"head\": \"#A23DAD\",\n                    \"link\": \"#07818F\",\n                    \"options\": \"#947014\",\n                    \"patch\": \"#bf581d\",\n                    \"post\": \"#186FAF\",\n                    \"put\": \"#95507c\",\n                  },\n                  \"primary\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#1a1a51\",\n                    \"light\": \"#6868cf\",\n                    \"main\": \"#32329f\",\n                  },\n                  \"responses\": {\n                    \"error\": {\n                      \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                      \"color\": \"#d41f1c\",\n                      \"tabTextColor\": \"#d41f1c\",\n                    },\n                    \"info\": {\n                      \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                      \"color\": \"#87ceeb\",\n                      \"tabTextColor\": \"#87ceeb\",\n                    },\n                    \"redirect\": {\n                      \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                      \"color\": \"#ffa500\",\n                      \"tabTextColor\": \"#ffa500\",\n                    },\n                    \"success\": {\n                      \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                      \"color\": \"#1d8127\",\n                      \"tabTextColor\": \"#1d8127\",\n                    },\n                  },\n                  \"success\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#0a2e0e\",\n                    \"light\": \"#86e490\",\n                    \"main\": \"#1d8127\",\n                  },\n                  \"text\": {\n                    \"primary\": \"#333333\",\n                    \"secondary\": \"#666\",\n                  },\n                  \"tonalOffset\": 0.2,\n                  \"warning\": {\n                    \"contrastText\": \"#ffffff\",\n                    \"dark\": \"#996300\",\n                    \"light\": \"#ffc966\",\n                    \"main\": \"#ffa500\",\n                  },\n                },\n                \"extensionsHook\": undefined,\n                \"fab\": {\n                  \"backgroundColor\": \"#f2f2f2\",\n                  \"color\": \"#0065FB\",\n                },\n                \"logo\": {\n                  \"gutter\": \"2px\",\n                  \"maxHeight\": \"260px\",\n                  \"maxWidth\": \"260px\",\n                },\n                \"rightPanel\": {\n                  \"backgroundColor\": \"#263238\",\n                  \"servers\": {\n                    \"overlay\": {\n                      \"backgroundColor\": \"#fafafa\",\n                      \"textColor\": \"#263238\",\n                    },\n                    \"url\": {\n                      \"backgroundColor\": \"#fff\",\n                    },\n                  },\n                  \"textColor\": \"#ffffff\",\n                  \"width\": \"40%\",\n                },\n                \"schema\": {\n                  \"arrow\": {\n                    \"color\": \"#666\",\n                    \"size\": \"1.1em\",\n                  },\n                  \"defaultDetailsWidth\": \"75%\",\n                  \"labelsTextSize\": \"0.9em\",\n                  \"linesColor\": \"#7c7cbb\",\n                  \"nestedBackground\": \"#fafafa\",\n                  \"nestingSpacing\": \"1em\",\n                  \"requireLabelColor\": \"#d41f1c\",\n                  \"typeNameColor\": \"#666\",\n                  \"typeTitleColor\": \"#666\",\n                },\n                \"sidebar\": {\n                  \"activeTextColor\": \"#32329f\",\n                  \"arrow\": {\n                    \"color\": \"#333333\",\n                    \"size\": \"1.5em\",\n                  },\n                  \"backgroundColor\": \"#fafafa\",\n                  \"groupItems\": {\n                    \"activeBackgroundColor\": \"#e1e1e1\",\n                    \"activeTextColor\": \"#32329f\",\n                    \"textTransform\": \"uppercase\",\n                  },\n                  \"level1Items\": {\n                    \"activeBackgroundColor\": \"#ededed\",\n                    \"activeTextColor\": \"#32329f\",\n                    \"textTransform\": \"none\",\n                  },\n                  \"textColor\": \"#333333\",\n                  \"width\": \"260px\",\n                },\n                \"spacing\": {\n                  \"sectionHorizontal\": 40,\n                  \"sectionVertical\": 40,\n                  \"unit\": 5,\n                },\n                \"typography\": {\n                  \"code\": {\n                    \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                    \"color\": \"#e53935\",\n                    \"fontFamily\": \"Courier, monospace\",\n                    \"fontSize\": \"13px\",\n                    \"fontWeight\": \"400\",\n                    \"lineHeight\": \"1.5em\",\n                    \"wrap\": false,\n                  },\n                  \"fontFamily\": \"Roboto, sans-serif\",\n                  \"fontSize\": \"14px\",\n                  \"fontWeightBold\": \"600\",\n                  \"fontWeightLight\": \"300\",\n                  \"fontWeightRegular\": \"400\",\n                  \"headings\": {\n                    \"fontFamily\": \"Montserrat, sans-serif\",\n                    \"fontWeight\": \"400\",\n                    \"lineHeight\": \"1.6em\",\n                  },\n                  \"lineHeight\": \"1.5em\",\n                  \"links\": {\n                    \"color\": \"#32329f\",\n                    \"hover\": \"#6868cf\",\n                    \"hoverTextDecoration\": \"auto\",\n                    \"textDecoration\": \"auto\",\n                    \"visited\": \"#32329f\",\n                  },\n                  \"optimizeSpeed\": true,\n                  \"smoothing\": \"antialiased\",\n                },\n              },\n              \"unstable_ignoreMimeParameters\": false,\n            },\n            \"pattern\": undefined,\n            \"pointer\": \"#/components/schemas/Cat\",\n            \"rawSchema\": {\n              \"allOf\": [\n                {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n                {\n                  \"properties\": {\n                    \"packSize\": {\n                      \"type\": \"number\",\n                    },\n                  },\n                },\n              ],\n              \"type\": \"object\",\n            },\n            \"readOnly\": false,\n            \"refsStack\": [\n              \"#/components/schemas/Cat\",\n            ],\n            \"schema\": {\n              \"allOf\": undefined,\n              \"description\": undefined,\n              \"discriminator\": {\n                \"propertyName\": \"type\",\n              },\n              \"properties\": {\n                \"packSize\": {\n                  \"type\": \"number\",\n                  \"x-refsStack\": [\n                    \"#/components/schemas/Cat\",\n                  ],\n                },\n                \"type\": {\n                  \"type\": \"string\",\n                  \"x-refsStack\": [\n                    \"#/components/schemas/Cat\",\n                    \"#/components/schemas/Pet\",\n                  ],\n                },\n              },\n              \"readOnly\": undefined,\n              \"required\": [\n                \"type\",\n              ],\n              \"title\": \"Cat\",\n              \"type\": \"object\",\n              \"writeOnly\": undefined,\n              \"x-circular-ref\": undefined,\n              \"x-parentRefs\": [\n                \"#/components/schemas/Pet\",\n              ],\n            },\n            \"title\": \"Cat\",\n            \"type\": \"object\",\n            \"typePrefix\": \"\",\n            \"writeOnly\": false,\n            \"x-enumDescriptions\": undefined,\n          },\n        ],\n        \"options\": RedocNormalizedOptions {\n          \"allowedMdComponents\": {},\n          \"disableSearch\": false,\n          \"downloadDefinitionUrl\": undefined,\n          \"downloadFileName\": undefined,\n          \"downloadUrls\": undefined,\n          \"enumSkipQuotes\": false,\n          \"expandDefaultServerVariables\": false,\n          \"expandResponses\": {},\n          \"expandSingleSchemaField\": false,\n          \"generatedSamplesMaxDepth\": 10,\n          \"hideDownloadButtons\": false,\n          \"hideFab\": false,\n          \"hideHostname\": false,\n          \"hidePropertiesPrefix\": true,\n          \"hideRequestPayloadSample\": false,\n          \"hideSchemaPattern\": false,\n          \"hideSchemaTitles\": false,\n          \"hideSecuritySection\": false,\n          \"hideSingleRequestSampleTab\": false,\n          \"ignoreNamedSchemas\": Set {},\n          \"jsonSamplesExpandLevel\": 2,\n          \"maxDisplayedEnumValues\": undefined,\n          \"menuToggle\": true,\n          \"minCharacterLengthToInitSearch\": 3,\n          \"nativeScrollbars\": false,\n          \"nonce\": undefined,\n          \"onlyRequiredInSamples\": false,\n          \"pathInMiddlePanel\": false,\n          \"payloadSampleIdx\": 0,\n          \"sanitize\": false,\n          \"schemaDefinitionsTagName\": undefined,\n          \"schemasExpansionLevel\": 0,\n          \"scrollYOffset\": [Function],\n          \"showExtensions\": false,\n          \"showObjectSchemaExamples\": false,\n          \"showSecuritySchemeType\": false,\n          \"showWebhookVerb\": false,\n          \"sideNavStyle\": \"summary-only\",\n          \"simpleOneOfTypeLabel\": false,\n          \"sortEnumValuesAlphabetically\": false,\n          \"sortOperationsAlphabetically\": false,\n          \"sortPropsAlphabetically\": false,\n          \"sortRequiredPropsFirst\": false,\n          \"sortTagsAlphabetically\": false,\n          \"theme\": {\n            \"breakpoints\": {\n              \"large\": \"105rem\",\n              \"medium\": \"75rem\",\n              \"small\": \"50rem\",\n            },\n            \"codeBlock\": {\n              \"backgroundColor\": \"#11171a\",\n            },\n            \"colors\": {\n              \"border\": {\n                \"dark\": \"rgba(0,0,0, 0.1)\",\n                \"light\": \"#ffffff\",\n              },\n              \"error\": {\n                \"contrastText\": \"#fff\",\n                \"dark\": \"#7a1210\",\n                \"light\": \"#eb6d6b\",\n                \"main\": \"#d41f1c\",\n              },\n              \"gray\": {\n                \"100\": \"#F5F5F5\",\n                \"50\": \"#FAFAFA\",\n              },\n              \"http\": {\n                \"basic\": \"#707070\",\n                \"delete\": \"#cc3333\",\n                \"get\": \"#2F8132\",\n                \"head\": \"#A23DAD\",\n                \"link\": \"#07818F\",\n                \"options\": \"#947014\",\n                \"patch\": \"#bf581d\",\n                \"post\": \"#186FAF\",\n                \"put\": \"#95507c\",\n              },\n              \"primary\": {\n                \"contrastText\": \"#fff\",\n                \"dark\": \"#1a1a51\",\n                \"light\": \"#6868cf\",\n                \"main\": \"#32329f\",\n              },\n              \"responses\": {\n                \"error\": {\n                  \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                  \"color\": \"#d41f1c\",\n                  \"tabTextColor\": \"#d41f1c\",\n                },\n                \"info\": {\n                  \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                  \"color\": \"#87ceeb\",\n                  \"tabTextColor\": \"#87ceeb\",\n                },\n                \"redirect\": {\n                  \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                  \"color\": \"#ffa500\",\n                  \"tabTextColor\": \"#ffa500\",\n                },\n                \"success\": {\n                  \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                  \"color\": \"#1d8127\",\n                  \"tabTextColor\": \"#1d8127\",\n                },\n              },\n              \"success\": {\n                \"contrastText\": \"#fff\",\n                \"dark\": \"#0a2e0e\",\n                \"light\": \"#86e490\",\n                \"main\": \"#1d8127\",\n              },\n              \"text\": {\n                \"primary\": \"#333333\",\n                \"secondary\": \"#666\",\n              },\n              \"tonalOffset\": 0.2,\n              \"warning\": {\n                \"contrastText\": \"#ffffff\",\n                \"dark\": \"#996300\",\n                \"light\": \"#ffc966\",\n                \"main\": \"#ffa500\",\n              },\n            },\n            \"extensionsHook\": undefined,\n            \"fab\": {\n              \"backgroundColor\": \"#f2f2f2\",\n              \"color\": \"#0065FB\",\n            },\n            \"logo\": {\n              \"gutter\": \"2px\",\n              \"maxHeight\": \"260px\",\n              \"maxWidth\": \"260px\",\n            },\n            \"rightPanel\": {\n              \"backgroundColor\": \"#263238\",\n              \"servers\": {\n                \"overlay\": {\n                  \"backgroundColor\": \"#fafafa\",\n                  \"textColor\": \"#263238\",\n                },\n                \"url\": {\n                  \"backgroundColor\": \"#fff\",\n                },\n              },\n              \"textColor\": \"#ffffff\",\n              \"width\": \"40%\",\n            },\n            \"schema\": {\n              \"arrow\": {\n                \"color\": \"#666\",\n                \"size\": \"1.1em\",\n              },\n              \"defaultDetailsWidth\": \"75%\",\n              \"labelsTextSize\": \"0.9em\",\n              \"linesColor\": \"#7c7cbb\",\n              \"nestedBackground\": \"#fafafa\",\n              \"nestingSpacing\": \"1em\",\n              \"requireLabelColor\": \"#d41f1c\",\n              \"typeNameColor\": \"#666\",\n              \"typeTitleColor\": \"#666\",\n            },\n            \"sidebar\": {\n              \"activeTextColor\": \"#32329f\",\n              \"arrow\": {\n                \"color\": \"#333333\",\n                \"size\": \"1.5em\",\n              },\n              \"backgroundColor\": \"#fafafa\",\n              \"groupItems\": {\n                \"activeBackgroundColor\": \"#e1e1e1\",\n                \"activeTextColor\": \"#32329f\",\n                \"textTransform\": \"uppercase\",\n              },\n              \"level1Items\": {\n                \"activeBackgroundColor\": \"#ededed\",\n                \"activeTextColor\": \"#32329f\",\n                \"textTransform\": \"none\",\n              },\n              \"textColor\": \"#333333\",\n              \"width\": \"260px\",\n            },\n            \"spacing\": {\n              \"sectionHorizontal\": 40,\n              \"sectionVertical\": 40,\n              \"unit\": 5,\n            },\n            \"typography\": {\n              \"code\": {\n                \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                \"color\": \"#e53935\",\n                \"fontFamily\": \"Courier, monospace\",\n                \"fontSize\": \"13px\",\n                \"fontWeight\": \"400\",\n                \"lineHeight\": \"1.5em\",\n                \"wrap\": false,\n              },\n              \"fontFamily\": \"Roboto, sans-serif\",\n              \"fontSize\": \"14px\",\n              \"fontWeightBold\": \"600\",\n              \"fontWeightLight\": \"300\",\n              \"fontWeightRegular\": \"400\",\n              \"headings\": {\n                \"fontFamily\": \"Montserrat, sans-serif\",\n                \"fontWeight\": \"400\",\n                \"lineHeight\": \"1.6em\",\n              },\n              \"lineHeight\": \"1.5em\",\n              \"links\": {\n                \"color\": \"#32329f\",\n                \"hover\": \"#6868cf\",\n                \"hoverTextDecoration\": \"auto\",\n                \"textDecoration\": \"auto\",\n                \"visited\": \"#32329f\",\n              },\n              \"optimizeSpeed\": true,\n              \"smoothing\": \"antialiased\",\n            },\n          },\n          \"unstable_ignoreMimeParameters\": false,\n        },\n        \"pattern\": undefined,\n        \"pointer\": \"#/components/schemas/Pet\",\n        \"rawSchema\": {\n          \"discriminator\": {\n            \"propertyName\": \"type\",\n          },\n          \"properties\": {\n            \"type\": {\n              \"type\": \"string\",\n            },\n          },\n          \"required\": [\n            \"type\",\n          ],\n          \"type\": \"object\",\n        },\n        \"readOnly\": false,\n        \"refsStack\": [\n          \"#/components/schemas/Pet\",\n        ],\n        \"schema\": {\n          \"discriminator\": {\n            \"propertyName\": \"type\",\n          },\n          \"properties\": {\n            \"type\": {\n              \"type\": \"string\",\n            },\n          },\n          \"required\": [\n            \"type\",\n          ],\n          \"type\": \"object\",\n        },\n        \"title\": \"Pet\",\n        \"type\": \"object\",\n        \"typePrefix\": \"\",\n        \"writeOnly\": false,\n        \"x-enumDescriptions\": undefined,\n      },\n    }\n  }\n  level={1}\n  schema={\n    SchemaModel {\n      \"activeOneOf\": 0,\n      \"const\": \"\",\n      \"constraints\": [],\n      \"contentEncoding\": undefined,\n      \"contentMediaType\": undefined,\n      \"default\": undefined,\n      \"deprecated\": false,\n      \"description\": \"\",\n      \"displayFormat\": undefined,\n      \"displayType\": \"object\",\n      \"enum\": [],\n      \"example\": undefined,\n      \"examples\": undefined,\n      \"externalDocs\": undefined,\n      \"fields\": [\n        FieldModel {\n          \"const\": \"\",\n          \"deprecated\": false,\n          \"description\": \"\",\n          \"example\": undefined,\n          \"expanded\": undefined,\n          \"explode\": false,\n          \"in\": undefined,\n          \"kind\": \"field\",\n          \"name\": \"packSize\",\n          \"required\": false,\n          \"schema\": SchemaModel {\n            \"activeOneOf\": 0,\n            \"const\": \"\",\n            \"constraints\": [],\n            \"contentEncoding\": undefined,\n            \"contentMediaType\": undefined,\n            \"default\": undefined,\n            \"deprecated\": false,\n            \"description\": \"\",\n            \"displayFormat\": undefined,\n            \"displayType\": \"number\",\n            \"enum\": [],\n            \"example\": undefined,\n            \"examples\": undefined,\n            \"externalDocs\": undefined,\n            \"format\": undefined,\n            \"isCircular\": false,\n            \"isPrimitive\": true,\n            \"maxItems\": undefined,\n            \"minItems\": undefined,\n            \"options\": RedocNormalizedOptions {\n              \"allowedMdComponents\": {},\n              \"disableSearch\": false,\n              \"downloadDefinitionUrl\": undefined,\n              \"downloadFileName\": undefined,\n              \"downloadUrls\": undefined,\n              \"enumSkipQuotes\": false,\n              \"expandDefaultServerVariables\": false,\n              \"expandResponses\": {},\n              \"expandSingleSchemaField\": false,\n              \"generatedSamplesMaxDepth\": 10,\n              \"hideDownloadButtons\": false,\n              \"hideFab\": false,\n              \"hideHostname\": false,\n              \"hidePropertiesPrefix\": true,\n              \"hideRequestPayloadSample\": false,\n              \"hideSchemaPattern\": false,\n              \"hideSchemaTitles\": false,\n              \"hideSecuritySection\": false,\n              \"hideSingleRequestSampleTab\": false,\n              \"ignoreNamedSchemas\": Set {},\n              \"jsonSamplesExpandLevel\": 2,\n              \"maxDisplayedEnumValues\": undefined,\n              \"menuToggle\": true,\n              \"minCharacterLengthToInitSearch\": 3,\n              \"nativeScrollbars\": false,\n              \"nonce\": undefined,\n              \"onlyRequiredInSamples\": false,\n              \"pathInMiddlePanel\": false,\n              \"payloadSampleIdx\": 0,\n              \"sanitize\": false,\n              \"schemaDefinitionsTagName\": undefined,\n              \"schemasExpansionLevel\": 0,\n              \"scrollYOffset\": [Function],\n              \"showExtensions\": false,\n              \"showObjectSchemaExamples\": false,\n              \"showSecuritySchemeType\": false,\n              \"showWebhookVerb\": false,\n              \"sideNavStyle\": \"summary-only\",\n              \"simpleOneOfTypeLabel\": false,\n              \"sortEnumValuesAlphabetically\": false,\n              \"sortOperationsAlphabetically\": false,\n              \"sortPropsAlphabetically\": false,\n              \"sortRequiredPropsFirst\": false,\n              \"sortTagsAlphabetically\": false,\n              \"theme\": {\n                \"breakpoints\": {\n                  \"large\": \"105rem\",\n                  \"medium\": \"75rem\",\n                  \"small\": \"50rem\",\n                },\n                \"codeBlock\": {\n                  \"backgroundColor\": \"#11171a\",\n                },\n                \"colors\": {\n                  \"border\": {\n                    \"dark\": \"rgba(0,0,0, 0.1)\",\n                    \"light\": \"#ffffff\",\n                  },\n                  \"error\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#7a1210\",\n                    \"light\": \"#eb6d6b\",\n                    \"main\": \"#d41f1c\",\n                  },\n                  \"gray\": {\n                    \"100\": \"#F5F5F5\",\n                    \"50\": \"#FAFAFA\",\n                  },\n                  \"http\": {\n                    \"basic\": \"#707070\",\n                    \"delete\": \"#cc3333\",\n                    \"get\": \"#2F8132\",\n                    \"head\": \"#A23DAD\",\n                    \"link\": \"#07818F\",\n                    \"options\": \"#947014\",\n                    \"patch\": \"#bf581d\",\n                    \"post\": \"#186FAF\",\n                    \"put\": \"#95507c\",\n                  },\n                  \"primary\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#1a1a51\",\n                    \"light\": \"#6868cf\",\n                    \"main\": \"#32329f\",\n                  },\n                  \"responses\": {\n                    \"error\": {\n                      \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                      \"color\": \"#d41f1c\",\n                      \"tabTextColor\": \"#d41f1c\",\n                    },\n                    \"info\": {\n                      \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                      \"color\": \"#87ceeb\",\n                      \"tabTextColor\": \"#87ceeb\",\n                    },\n                    \"redirect\": {\n                      \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                      \"color\": \"#ffa500\",\n                      \"tabTextColor\": \"#ffa500\",\n                    },\n                    \"success\": {\n                      \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                      \"color\": \"#1d8127\",\n                      \"tabTextColor\": \"#1d8127\",\n                    },\n                  },\n                  \"success\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#0a2e0e\",\n                    \"light\": \"#86e490\",\n                    \"main\": \"#1d8127\",\n                  },\n                  \"text\": {\n                    \"primary\": \"#333333\",\n                    \"secondary\": \"#666\",\n                  },\n                  \"tonalOffset\": 0.2,\n                  \"warning\": {\n                    \"contrastText\": \"#ffffff\",\n                    \"dark\": \"#996300\",\n                    \"light\": \"#ffc966\",\n                    \"main\": \"#ffa500\",\n                  },\n                },\n                \"extensionsHook\": undefined,\n                \"fab\": {\n                  \"backgroundColor\": \"#f2f2f2\",\n                  \"color\": \"#0065FB\",\n                },\n                \"logo\": {\n                  \"gutter\": \"2px\",\n                  \"maxHeight\": \"260px\",\n                  \"maxWidth\": \"260px\",\n                },\n                \"rightPanel\": {\n                  \"backgroundColor\": \"#263238\",\n                  \"servers\": {\n                    \"overlay\": {\n                      \"backgroundColor\": \"#fafafa\",\n                      \"textColor\": \"#263238\",\n                    },\n                    \"url\": {\n                      \"backgroundColor\": \"#fff\",\n                    },\n                  },\n                  \"textColor\": \"#ffffff\",\n                  \"width\": \"40%\",\n                },\n                \"schema\": {\n                  \"arrow\": {\n                    \"color\": \"#666\",\n                    \"size\": \"1.1em\",\n                  },\n                  \"defaultDetailsWidth\": \"75%\",\n                  \"labelsTextSize\": \"0.9em\",\n                  \"linesColor\": \"#7c7cbb\",\n                  \"nestedBackground\": \"#fafafa\",\n                  \"nestingSpacing\": \"1em\",\n                  \"requireLabelColor\": \"#d41f1c\",\n                  \"typeNameColor\": \"#666\",\n                  \"typeTitleColor\": \"#666\",\n                },\n                \"sidebar\": {\n                  \"activeTextColor\": \"#32329f\",\n                  \"arrow\": {\n                    \"color\": \"#333333\",\n                    \"size\": \"1.5em\",\n                  },\n                  \"backgroundColor\": \"#fafafa\",\n                  \"groupItems\": {\n                    \"activeBackgroundColor\": \"#e1e1e1\",\n                    \"activeTextColor\": \"#32329f\",\n                    \"textTransform\": \"uppercase\",\n                  },\n                  \"level1Items\": {\n                    \"activeBackgroundColor\": \"#ededed\",\n                    \"activeTextColor\": \"#32329f\",\n                    \"textTransform\": \"none\",\n                  },\n                  \"textColor\": \"#333333\",\n                  \"width\": \"260px\",\n                },\n                \"spacing\": {\n                  \"sectionHorizontal\": 40,\n                  \"sectionVertical\": 40,\n                  \"unit\": 5,\n                },\n                \"typography\": {\n                  \"code\": {\n                    \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                    \"color\": \"#e53935\",\n                    \"fontFamily\": \"Courier, monospace\",\n                    \"fontSize\": \"13px\",\n                    \"fontWeight\": \"400\",\n                    \"lineHeight\": \"1.5em\",\n                    \"wrap\": false,\n                  },\n                  \"fontFamily\": \"Roboto, sans-serif\",\n                  \"fontSize\": \"14px\",\n                  \"fontWeightBold\": \"600\",\n                  \"fontWeightLight\": \"300\",\n                  \"fontWeightRegular\": \"400\",\n                  \"headings\": {\n                    \"fontFamily\": \"Montserrat, sans-serif\",\n                    \"fontWeight\": \"400\",\n                    \"lineHeight\": \"1.6em\",\n                  },\n                  \"lineHeight\": \"1.5em\",\n                  \"links\": {\n                    \"color\": \"#32329f\",\n                    \"hover\": \"#6868cf\",\n                    \"hoverTextDecoration\": \"auto\",\n                    \"textDecoration\": \"auto\",\n                    \"visited\": \"#32329f\",\n                  },\n                  \"optimizeSpeed\": true,\n                  \"smoothing\": \"antialiased\",\n                },\n              },\n              \"unstable_ignoreMimeParameters\": false,\n            },\n            \"pattern\": undefined,\n            \"pointer\": \"#/components/schemas/Dog/properties/packSize\",\n            \"rawSchema\": {\n              \"default\": undefined,\n              \"type\": \"number\",\n            },\n            \"readOnly\": false,\n            \"refsStack\": [\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Dog/properties/packSize\",\n            ],\n            \"schema\": {\n              \"default\": undefined,\n              \"type\": \"number\",\n            },\n            \"title\": \"\",\n            \"type\": \"number\",\n            \"typePrefix\": \"\",\n            \"writeOnly\": false,\n            \"x-enumDescriptions\": undefined,\n          },\n        },\n        FieldModel {\n          \"const\": \"\",\n          \"deprecated\": false,\n          \"description\": \"\",\n          \"example\": undefined,\n          \"expanded\": undefined,\n          \"explode\": false,\n          \"in\": undefined,\n          \"kind\": \"field\",\n          \"name\": \"type\",\n          \"required\": true,\n          \"schema\": SchemaModel {\n            \"activeOneOf\": 0,\n            \"const\": \"\",\n            \"constraints\": [],\n            \"contentEncoding\": undefined,\n            \"contentMediaType\": undefined,\n            \"default\": undefined,\n            \"deprecated\": false,\n            \"description\": \"\",\n            \"displayFormat\": undefined,\n            \"displayType\": \"string\",\n            \"enum\": [],\n            \"example\": undefined,\n            \"examples\": undefined,\n            \"externalDocs\": undefined,\n            \"format\": undefined,\n            \"isCircular\": false,\n            \"isPrimitive\": true,\n            \"maxItems\": undefined,\n            \"minItems\": undefined,\n            \"options\": RedocNormalizedOptions {\n              \"allowedMdComponents\": {},\n              \"disableSearch\": false,\n              \"downloadDefinitionUrl\": undefined,\n              \"downloadFileName\": undefined,\n              \"downloadUrls\": undefined,\n              \"enumSkipQuotes\": false,\n              \"expandDefaultServerVariables\": false,\n              \"expandResponses\": {},\n              \"expandSingleSchemaField\": false,\n              \"generatedSamplesMaxDepth\": 10,\n              \"hideDownloadButtons\": false,\n              \"hideFab\": false,\n              \"hideHostname\": false,\n              \"hidePropertiesPrefix\": true,\n              \"hideRequestPayloadSample\": false,\n              \"hideSchemaPattern\": false,\n              \"hideSchemaTitles\": false,\n              \"hideSecuritySection\": false,\n              \"hideSingleRequestSampleTab\": false,\n              \"ignoreNamedSchemas\": Set {},\n              \"jsonSamplesExpandLevel\": 2,\n              \"maxDisplayedEnumValues\": undefined,\n              \"menuToggle\": true,\n              \"minCharacterLengthToInitSearch\": 3,\n              \"nativeScrollbars\": false,\n              \"nonce\": undefined,\n              \"onlyRequiredInSamples\": false,\n              \"pathInMiddlePanel\": false,\n              \"payloadSampleIdx\": 0,\n              \"sanitize\": false,\n              \"schemaDefinitionsTagName\": undefined,\n              \"schemasExpansionLevel\": 0,\n              \"scrollYOffset\": [Function],\n              \"showExtensions\": false,\n              \"showObjectSchemaExamples\": false,\n              \"showSecuritySchemeType\": false,\n              \"showWebhookVerb\": false,\n              \"sideNavStyle\": \"summary-only\",\n              \"simpleOneOfTypeLabel\": false,\n              \"sortEnumValuesAlphabetically\": false,\n              \"sortOperationsAlphabetically\": false,\n              \"sortPropsAlphabetically\": false,\n              \"sortRequiredPropsFirst\": false,\n              \"sortTagsAlphabetically\": false,\n              \"theme\": {\n                \"breakpoints\": {\n                  \"large\": \"105rem\",\n                  \"medium\": \"75rem\",\n                  \"small\": \"50rem\",\n                },\n                \"codeBlock\": {\n                  \"backgroundColor\": \"#11171a\",\n                },\n                \"colors\": {\n                  \"border\": {\n                    \"dark\": \"rgba(0,0,0, 0.1)\",\n                    \"light\": \"#ffffff\",\n                  },\n                  \"error\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#7a1210\",\n                    \"light\": \"#eb6d6b\",\n                    \"main\": \"#d41f1c\",\n                  },\n                  \"gray\": {\n                    \"100\": \"#F5F5F5\",\n                    \"50\": \"#FAFAFA\",\n                  },\n                  \"http\": {\n                    \"basic\": \"#707070\",\n                    \"delete\": \"#cc3333\",\n                    \"get\": \"#2F8132\",\n                    \"head\": \"#A23DAD\",\n                    \"link\": \"#07818F\",\n                    \"options\": \"#947014\",\n                    \"patch\": \"#bf581d\",\n                    \"post\": \"#186FAF\",\n                    \"put\": \"#95507c\",\n                  },\n                  \"primary\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#1a1a51\",\n                    \"light\": \"#6868cf\",\n                    \"main\": \"#32329f\",\n                  },\n                  \"responses\": {\n                    \"error\": {\n                      \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                      \"color\": \"#d41f1c\",\n                      \"tabTextColor\": \"#d41f1c\",\n                    },\n                    \"info\": {\n                      \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                      \"color\": \"#87ceeb\",\n                      \"tabTextColor\": \"#87ceeb\",\n                    },\n                    \"redirect\": {\n                      \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                      \"color\": \"#ffa500\",\n                      \"tabTextColor\": \"#ffa500\",\n                    },\n                    \"success\": {\n                      \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                      \"color\": \"#1d8127\",\n                      \"tabTextColor\": \"#1d8127\",\n                    },\n                  },\n                  \"success\": {\n                    \"contrastText\": \"#fff\",\n                    \"dark\": \"#0a2e0e\",\n                    \"light\": \"#86e490\",\n                    \"main\": \"#1d8127\",\n                  },\n                  \"text\": {\n                    \"primary\": \"#333333\",\n                    \"secondary\": \"#666\",\n                  },\n                  \"tonalOffset\": 0.2,\n                  \"warning\": {\n                    \"contrastText\": \"#ffffff\",\n                    \"dark\": \"#996300\",\n                    \"light\": \"#ffc966\",\n                    \"main\": \"#ffa500\",\n                  },\n                },\n                \"extensionsHook\": undefined,\n                \"fab\": {\n                  \"backgroundColor\": \"#f2f2f2\",\n                  \"color\": \"#0065FB\",\n                },\n                \"logo\": {\n                  \"gutter\": \"2px\",\n                  \"maxHeight\": \"260px\",\n                  \"maxWidth\": \"260px\",\n                },\n                \"rightPanel\": {\n                  \"backgroundColor\": \"#263238\",\n                  \"servers\": {\n                    \"overlay\": {\n                      \"backgroundColor\": \"#fafafa\",\n                      \"textColor\": \"#263238\",\n                    },\n                    \"url\": {\n                      \"backgroundColor\": \"#fff\",\n                    },\n                  },\n                  \"textColor\": \"#ffffff\",\n                  \"width\": \"40%\",\n                },\n                \"schema\": {\n                  \"arrow\": {\n                    \"color\": \"#666\",\n                    \"size\": \"1.1em\",\n                  },\n                  \"defaultDetailsWidth\": \"75%\",\n                  \"labelsTextSize\": \"0.9em\",\n                  \"linesColor\": \"#7c7cbb\",\n                  \"nestedBackground\": \"#fafafa\",\n                  \"nestingSpacing\": \"1em\",\n                  \"requireLabelColor\": \"#d41f1c\",\n                  \"typeNameColor\": \"#666\",\n                  \"typeTitleColor\": \"#666\",\n                },\n                \"sidebar\": {\n                  \"activeTextColor\": \"#32329f\",\n                  \"arrow\": {\n                    \"color\": \"#333333\",\n                    \"size\": \"1.5em\",\n                  },\n                  \"backgroundColor\": \"#fafafa\",\n                  \"groupItems\": {\n                    \"activeBackgroundColor\": \"#e1e1e1\",\n                    \"activeTextColor\": \"#32329f\",\n                    \"textTransform\": \"uppercase\",\n                  },\n                  \"level1Items\": {\n                    \"activeBackgroundColor\": \"#ededed\",\n                    \"activeTextColor\": \"#32329f\",\n                    \"textTransform\": \"none\",\n                  },\n                  \"textColor\": \"#333333\",\n                  \"width\": \"260px\",\n                },\n                \"spacing\": {\n                  \"sectionHorizontal\": 40,\n                  \"sectionVertical\": 40,\n                  \"unit\": 5,\n                },\n                \"typography\": {\n                  \"code\": {\n                    \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n                    \"color\": \"#e53935\",\n                    \"fontFamily\": \"Courier, monospace\",\n                    \"fontSize\": \"13px\",\n                    \"fontWeight\": \"400\",\n                    \"lineHeight\": \"1.5em\",\n                    \"wrap\": false,\n                  },\n                  \"fontFamily\": \"Roboto, sans-serif\",\n                  \"fontSize\": \"14px\",\n                  \"fontWeightBold\": \"600\",\n                  \"fontWeightLight\": \"300\",\n                  \"fontWeightRegular\": \"400\",\n                  \"headings\": {\n                    \"fontFamily\": \"Montserrat, sans-serif\",\n                    \"fontWeight\": \"400\",\n                    \"lineHeight\": \"1.6em\",\n                  },\n                  \"lineHeight\": \"1.5em\",\n                  \"links\": {\n                    \"color\": \"#32329f\",\n                    \"hover\": \"#6868cf\",\n                    \"hoverTextDecoration\": \"auto\",\n                    \"textDecoration\": \"auto\",\n                    \"visited\": \"#32329f\",\n                  },\n                  \"optimizeSpeed\": true,\n                  \"smoothing\": \"antialiased\",\n                },\n              },\n              \"unstable_ignoreMimeParameters\": false,\n            },\n            \"pattern\": undefined,\n            \"pointer\": \"#/components/schemas/Dog/properties/type\",\n            \"rawSchema\": {\n              \"default\": undefined,\n              \"type\": \"string\",\n              \"x-refsStack\": [\n                \"#/components/schemas/Dog\",\n                \"#/components/schemas/Pet\",\n              ],\n            },\n            \"readOnly\": false,\n            \"refsStack\": [\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Pet\",\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Pet\",\n              \"#/components/schemas/Dog/properties/type\",\n            ],\n            \"schema\": {\n              \"default\": undefined,\n              \"type\": \"string\",\n              \"x-refsStack\": [\n                \"#/components/schemas/Dog\",\n                \"#/components/schemas/Pet\",\n              ],\n            },\n            \"title\": \"\",\n            \"type\": \"string\",\n            \"typePrefix\": \"\",\n            \"writeOnly\": false,\n            \"x-enumDescriptions\": undefined,\n          },\n        },\n      ],\n      \"format\": undefined,\n      \"isCircular\": false,\n      \"isPrimitive\": false,\n      \"maxItems\": undefined,\n      \"minItems\": undefined,\n      \"options\": RedocNormalizedOptions {\n        \"allowedMdComponents\": {},\n        \"disableSearch\": false,\n        \"downloadDefinitionUrl\": undefined,\n        \"downloadFileName\": undefined,\n        \"downloadUrls\": undefined,\n        \"enumSkipQuotes\": false,\n        \"expandDefaultServerVariables\": false,\n        \"expandResponses\": {},\n        \"expandSingleSchemaField\": false,\n        \"generatedSamplesMaxDepth\": 10,\n        \"hideDownloadButtons\": false,\n        \"hideFab\": false,\n        \"hideHostname\": false,\n        \"hidePropertiesPrefix\": true,\n        \"hideRequestPayloadSample\": false,\n        \"hideSchemaPattern\": false,\n        \"hideSchemaTitles\": false,\n        \"hideSecuritySection\": false,\n        \"hideSingleRequestSampleTab\": false,\n        \"ignoreNamedSchemas\": Set {},\n        \"jsonSamplesExpandLevel\": 2,\n        \"maxDisplayedEnumValues\": undefined,\n        \"menuToggle\": true,\n        \"minCharacterLengthToInitSearch\": 3,\n        \"nativeScrollbars\": false,\n        \"nonce\": undefined,\n        \"onlyRequiredInSamples\": false,\n        \"pathInMiddlePanel\": false,\n        \"payloadSampleIdx\": 0,\n        \"sanitize\": false,\n        \"schemaDefinitionsTagName\": undefined,\n        \"schemasExpansionLevel\": 0,\n        \"scrollYOffset\": [Function],\n        \"showExtensions\": false,\n        \"showObjectSchemaExamples\": false,\n        \"showSecuritySchemeType\": false,\n        \"showWebhookVerb\": false,\n        \"sideNavStyle\": \"summary-only\",\n        \"simpleOneOfTypeLabel\": false,\n        \"sortEnumValuesAlphabetically\": false,\n        \"sortOperationsAlphabetically\": false,\n        \"sortPropsAlphabetically\": false,\n        \"sortRequiredPropsFirst\": false,\n        \"sortTagsAlphabetically\": false,\n        \"theme\": {\n          \"breakpoints\": {\n            \"large\": \"105rem\",\n            \"medium\": \"75rem\",\n            \"small\": \"50rem\",\n          },\n          \"codeBlock\": {\n            \"backgroundColor\": \"#11171a\",\n          },\n          \"colors\": {\n            \"border\": {\n              \"dark\": \"rgba(0,0,0, 0.1)\",\n              \"light\": \"#ffffff\",\n            },\n            \"error\": {\n              \"contrastText\": \"#fff\",\n              \"dark\": \"#7a1210\",\n              \"light\": \"#eb6d6b\",\n              \"main\": \"#d41f1c\",\n            },\n            \"gray\": {\n              \"100\": \"#F5F5F5\",\n              \"50\": \"#FAFAFA\",\n            },\n            \"http\": {\n              \"basic\": \"#707070\",\n              \"delete\": \"#cc3333\",\n              \"get\": \"#2F8132\",\n              \"head\": \"#A23DAD\",\n              \"link\": \"#07818F\",\n              \"options\": \"#947014\",\n              \"patch\": \"#bf581d\",\n              \"post\": \"#186FAF\",\n              \"put\": \"#95507c\",\n            },\n            \"primary\": {\n              \"contrastText\": \"#fff\",\n              \"dark\": \"#1a1a51\",\n              \"light\": \"#6868cf\",\n              \"main\": \"#32329f\",\n            },\n            \"responses\": {\n              \"error\": {\n                \"backgroundColor\": \"rgba(212,31,28,0.07)\",\n                \"color\": \"#d41f1c\",\n                \"tabTextColor\": \"#d41f1c\",\n              },\n              \"info\": {\n                \"backgroundColor\": \"rgba(135,206,235,0.1)\",\n                \"color\": \"#87ceeb\",\n                \"tabTextColor\": \"#87ceeb\",\n              },\n              \"redirect\": {\n                \"backgroundColor\": \"rgba(255,165,0,0.1)\",\n                \"color\": \"#ffa500\",\n                \"tabTextColor\": \"#ffa500\",\n              },\n              \"success\": {\n                \"backgroundColor\": \"rgba(29,129,39,0.07)\",\n                \"color\": \"#1d8127\",\n                \"tabTextColor\": \"#1d8127\",\n              },\n            },\n            \"success\": {\n              \"contrastText\": \"#fff\",\n              \"dark\": \"#0a2e0e\",\n              \"light\": \"#86e490\",\n              \"main\": \"#1d8127\",\n            },\n            \"text\": {\n              \"primary\": \"#333333\",\n              \"secondary\": \"#666\",\n            },\n            \"tonalOffset\": 0.2,\n            \"warning\": {\n              \"contrastText\": \"#ffffff\",\n              \"dark\": \"#996300\",\n              \"light\": \"#ffc966\",\n              \"main\": \"#ffa500\",\n            },\n          },\n          \"extensionsHook\": undefined,\n          \"fab\": {\n            \"backgroundColor\": \"#f2f2f2\",\n            \"color\": \"#0065FB\",\n          },\n          \"logo\": {\n            \"gutter\": \"2px\",\n            \"maxHeight\": \"260px\",\n            \"maxWidth\": \"260px\",\n          },\n          \"rightPanel\": {\n            \"backgroundColor\": \"#263238\",\n            \"servers\": {\n              \"overlay\": {\n                \"backgroundColor\": \"#fafafa\",\n                \"textColor\": \"#263238\",\n              },\n              \"url\": {\n                \"backgroundColor\": \"#fff\",\n              },\n            },\n            \"textColor\": \"#ffffff\",\n            \"width\": \"40%\",\n          },\n          \"schema\": {\n            \"arrow\": {\n              \"color\": \"#666\",\n              \"size\": \"1.1em\",\n            },\n            \"defaultDetailsWidth\": \"75%\",\n            \"labelsTextSize\": \"0.9em\",\n            \"linesColor\": \"#7c7cbb\",\n            \"nestedBackground\": \"#fafafa\",\n            \"nestingSpacing\": \"1em\",\n            \"requireLabelColor\": \"#d41f1c\",\n            \"typeNameColor\": \"#666\",\n            \"typeTitleColor\": \"#666\",\n          },\n          \"sidebar\": {\n            \"activeTextColor\": \"#32329f\",\n            \"arrow\": {\n              \"color\": \"#333333\",\n              \"size\": \"1.5em\",\n            },\n            \"backgroundColor\": \"#fafafa\",\n            \"groupItems\": {\n              \"activeBackgroundColor\": \"#e1e1e1\",\n              \"activeTextColor\": \"#32329f\",\n              \"textTransform\": \"uppercase\",\n            },\n            \"level1Items\": {\n              \"activeBackgroundColor\": \"#ededed\",\n              \"activeTextColor\": \"#32329f\",\n              \"textTransform\": \"none\",\n            },\n            \"textColor\": \"#333333\",\n            \"width\": \"260px\",\n          },\n          \"spacing\": {\n            \"sectionHorizontal\": 40,\n            \"sectionVertical\": 40,\n            \"unit\": 5,\n          },\n          \"typography\": {\n            \"code\": {\n              \"backgroundColor\": \"rgba(38, 50, 56, 0.05)\",\n              \"color\": \"#e53935\",\n              \"fontFamily\": \"Courier, monospace\",\n              \"fontSize\": \"13px\",\n              \"fontWeight\": \"400\",\n              \"lineHeight\": \"1.5em\",\n              \"wrap\": false,\n            },\n            \"fontFamily\": \"Roboto, sans-serif\",\n            \"fontSize\": \"14px\",\n            \"fontWeightBold\": \"600\",\n            \"fontWeightLight\": \"300\",\n            \"fontWeightRegular\": \"400\",\n            \"headings\": {\n              \"fontFamily\": \"Montserrat, sans-serif\",\n              \"fontWeight\": \"400\",\n              \"lineHeight\": \"1.6em\",\n            },\n            \"lineHeight\": \"1.5em\",\n            \"links\": {\n              \"color\": \"#32329f\",\n              \"hover\": \"#6868cf\",\n              \"hoverTextDecoration\": \"auto\",\n              \"textDecoration\": \"auto\",\n              \"visited\": \"#32329f\",\n            },\n            \"optimizeSpeed\": true,\n            \"smoothing\": \"antialiased\",\n          },\n        },\n        \"unstable_ignoreMimeParameters\": false,\n      },\n      \"pattern\": undefined,\n      \"pointer\": \"#/components/schemas/Dog\",\n      \"rawSchema\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n        ],\n        \"properties\": {\n          \"packSize\": {\n            \"type\": \"number\",\n          },\n        },\n        \"type\": \"object\",\n      },\n      \"readOnly\": false,\n      \"refsStack\": [\n        \"#/components/schemas/Dog\",\n      ],\n      \"schema\": {\n        \"allOf\": undefined,\n        \"description\": undefined,\n        \"discriminator\": {\n          \"propertyName\": \"type\",\n        },\n        \"properties\": {\n          \"packSize\": {\n            \"type\": \"number\",\n          },\n          \"type\": {\n            \"type\": \"string\",\n            \"x-refsStack\": [\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Pet\",\n            ],\n          },\n        },\n        \"readOnly\": undefined,\n        \"required\": [\n          \"type\",\n        ],\n        \"title\": \"Dog\",\n        \"type\": \"object\",\n        \"writeOnly\": undefined,\n        \"x-circular-ref\": undefined,\n        \"x-parentRefs\": [\n          \"#/components/schemas/Pet\",\n        ],\n      },\n      \"title\": \"Dog\",\n      \"type\": \"object\",\n      \"typePrefix\": \"\",\n      \"writeOnly\": false,\n      \"x-enumDescriptions\": undefined,\n    }\n  }\n/>\n`;\n\nexports[`Components SchemaView discriminator should correctly render discriminator dropdown 1`] = `\n<styled.table>\n  <tbody>\n    <Field\n      expandByDefault={false}\n      field={\n        FieldModel {\n          \"const\": \"\",\n          \"deprecated\": false,\n          \"description\": \"\",\n          \"example\": undefined,\n          \"expanded\": undefined,\n          \"explode\": false,\n          \"in\": undefined,\n          \"kind\": \"field\",\n          \"name\": \"packSize\",\n          \"required\": false,\n          \"schema\": SchemaModel {\n            \"activeOneOf\": 0,\n            \"const\": \"\",\n            \"constraints\": [],\n            \"contentEncoding\": undefined,\n            \"contentMediaType\": undefined,\n            \"default\": undefined,\n            \"deprecated\": false,\n            \"description\": \"\",\n            \"displayFormat\": undefined,\n            \"displayType\": \"number\",\n            \"enum\": [],\n            \"example\": undefined,\n            \"examples\": undefined,\n            \"externalDocs\": undefined,\n            \"format\": undefined,\n            \"isCircular\": false,\n            \"isPrimitive\": true,\n            \"maxItems\": undefined,\n            \"minItems\": undefined,\n            \"options\": \"<<<filtered>>>\",\n            \"pattern\": undefined,\n            \"pointer\": \"#/components/schemas/Dog/properties/packSize\",\n            \"rawSchema\": {\n              \"default\": undefined,\n              \"type\": \"number\",\n            },\n            \"readOnly\": false,\n            \"refsStack\": [\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Dog/properties/packSize\",\n            ],\n            \"schema\": {\n              \"default\": undefined,\n              \"type\": \"number\",\n            },\n            \"title\": \"\",\n            \"type\": \"number\",\n            \"typePrefix\": \"\",\n            \"writeOnly\": false,\n            \"x-enumDescriptions\": undefined,\n          },\n        }\n      }\n      fieldParentsName={[]}\n      isLast={false}\n      key=\"packSize\"\n      showExamples={false}\n    />\n    <Field\n      expandByDefault={false}\n      field={\n        FieldModel {\n          \"const\": \"\",\n          \"deprecated\": false,\n          \"description\": \"\",\n          \"example\": undefined,\n          \"expanded\": undefined,\n          \"explode\": false,\n          \"in\": undefined,\n          \"kind\": \"field\",\n          \"name\": \"type\",\n          \"required\": true,\n          \"schema\": SchemaModel {\n            \"activeOneOf\": 0,\n            \"const\": \"\",\n            \"constraints\": [],\n            \"contentEncoding\": undefined,\n            \"contentMediaType\": undefined,\n            \"default\": undefined,\n            \"deprecated\": false,\n            \"description\": \"\",\n            \"displayFormat\": undefined,\n            \"displayType\": \"string\",\n            \"enum\": [],\n            \"example\": undefined,\n            \"examples\": undefined,\n            \"externalDocs\": undefined,\n            \"format\": undefined,\n            \"isCircular\": false,\n            \"isPrimitive\": true,\n            \"maxItems\": undefined,\n            \"minItems\": undefined,\n            \"options\": \"<<<filtered>>>\",\n            \"pattern\": undefined,\n            \"pointer\": \"#/components/schemas/Dog/properties/type\",\n            \"rawSchema\": {\n              \"default\": undefined,\n              \"type\": \"string\",\n              \"x-refsStack\": [\n                \"#/components/schemas/Dog\",\n                \"#/components/schemas/Pet\",\n              ],\n            },\n            \"readOnly\": false,\n            \"refsStack\": [\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Pet\",\n              \"#/components/schemas/Dog\",\n              \"#/components/schemas/Pet\",\n              \"#/components/schemas/Dog/properties/type\",\n            ],\n            \"schema\": {\n              \"default\": undefined,\n              \"type\": \"string\",\n              \"x-refsStack\": [\n                \"#/components/schemas/Dog\",\n                \"#/components/schemas/Pet\",\n              ],\n            },\n            \"title\": \"\",\n            \"type\": \"string\",\n            \"typePrefix\": \"\",\n            \"writeOnly\": false,\n            \"x-enumDescriptions\": undefined,\n          },\n        }\n      }\n      fieldParentsName={[]}\n      isLast={true}\n      key=\"type\"\n      renderDiscriminatorSwitch={[Function]}\n      showExamples={false}\n    />\n  </tbody>\n</styled.table>\n`;\n"
  },
  {
    "path": "src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`FieldDetailsComponent renders correctly 1`] = `\n<div>\n  <div>\n    <span\n      class=\"sc-kpDqfm sc-dAlyuH cGRfjn gHomYR\"\n    >\n      test type prefix\n    </span>\n    <span\n      class=\"sc-kpDqfm sc-jlZhew cGRfjn dYtiIA\"\n    >\n      array\n    </span>\n    <span\n      class=\"sc-kpDqfm sc-cwHptR cGRfjn gyVIPr\"\n    >\n       (test title) \n    </span>\n    <span>\n       \n      <span\n        class=\"sc-kpDqfm sc-gFqAkR cGRfjn fYEICH\"\n      >\n          \n      </span>\n    </span>\n  </div>\n  <div>\n    <span\n      class=\"sc-kpDqfm cGRfjn\"\n    >\n       Default: \n    </span>\n     \n    <span\n      class=\"sc-kpDqfm sc-eldPxv cGRfjn ehWiAn\"\n    >\n      []\n    </span>\n  </div>\n   \n  <div>\n    <span\n      class=\"sc-kpDqfm cGRfjn\"\n    >\n       Example: \n    </span>\n     \n    <span\n      class=\"sc-kpDqfm sc-eldPxv cGRfjn ehWiAn\"\n    >\n      \"example\"\n    </span>\n  </div>\n  <div>\n    <div\n      class=\"sc-lcIPJg sc-hknOHE gBHqkN jFBMaE\"\n    >\n      <p>\n        test description\n      </p>\n      \n\n    </div>\n  </div>\n</div>\n`;\n\nexports[`FieldDetailsComponent renders correctly when default value is object in request body 1`] = `\n<div>\n  <div>\n    <span\n      class=\"sc-kpDqfm sc-dAlyuH cGRfjn gHomYR\"\n    />\n    <span\n      class=\"sc-kpDqfm sc-jlZhew cGRfjn dYtiIA\"\n    >\n      object\n    </span>\n    <span\n      class=\"sc-kpDqfm sc-cwHptR cGRfjn gyVIPr\"\n    >\n       (test title) \n    </span>\n    <span>\n       \n      <span\n        class=\"sc-kpDqfm sc-gFqAkR cGRfjn fYEICH\"\n      >\n          \n      </span>\n    </span>\n  </div>\n  <div>\n    <span\n      class=\"sc-kpDqfm cGRfjn\"\n    >\n       Default: \n    </span>\n     \n    <span\n      class=\"sc-kpDqfm sc-eldPxv cGRfjn ehWiAn\"\n    >\n      {\"properties\":{}}\n    </span>\n  </div>\n   \n  <div>\n    <span\n      class=\"sc-kpDqfm cGRfjn\"\n    >\n       Example: \n    </span>\n     \n    <span\n      class=\"sc-kpDqfm sc-eldPxv cGRfjn ehWiAn\"\n    >\n      \"example\"\n    </span>\n  </div>\n  <div>\n    <div\n      class=\"sc-lcIPJg sc-hknOHE gBHqkN jFBMaE\"\n    >\n      <p>\n        test description\n      </p>\n      \n\n    </div>\n  </div>\n</div>\n`;\n\nexports[`FieldDetailsComponent renders correctly when field items have string type and pattern 1`] = `\n<div>\n  <div>\n    <span\n      class=\"sc-kpDqfm sc-dAlyuH cGRfjn gHomYR\"\n    />\n    <span\n      class=\"sc-kpDqfm sc-jlZhew cGRfjn dYtiIA\"\n    >\n      Array of strings\n    </span>\n    <span\n      class=\"sc-kpDqfm sc-cwHptR cGRfjn gyVIPr\"\n    >\n       (test title) \n    </span>\n    <span>\n       \n      <span\n        class=\"sc-kpDqfm sc-gFqAkR cGRfjn fYEICH\"\n      >\n          \n      </span>\n    </span>\n    <span\n      class=\"sc-kpDqfm sc-dAlyuH sc-gvZAcH cGRfjn gHomYR eXivNJ\"\n    >\n      [ items\n      <span>\n         \n        <span\n          class=\"sc-kpDqfm sc-gFqAkR cGRfjn fYEICH\"\n        >\n           &lt;= 128 characters \n        </span>\n      </span>\n      <span\n        class=\"sc-kpDqfm sc-eDPEul cGRfjn cCKYVD\"\n      >\n        ^see regex[0-9]$\n      </span>\n       ]\n    </span>\n  </div>\n   \n  <div>\n    <span\n      class=\"sc-kpDqfm cGRfjn\"\n    >\n       Example: \n    </span>\n     \n    <span\n      class=\"sc-kpDqfm sc-eldPxv cGRfjn ehWiAn\"\n    >\n      \"example\"\n    </span>\n  </div>\n  <div>\n    <div\n      class=\"sc-lcIPJg sc-hknOHE gBHqkN jFBMaE\"\n    >\n      <p>\n        test description\n      </p>\n      \n\n    </div>\n  </div>\n</div>\n`;\n"
  },
  {
    "path": "src/components/__tests__/__snapshots__/OneOfSchema.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Components SchemaView OneOf deprecated should match snapshot 1`] = `\n<div>\n  <span\n    class=\"sc-fUnMCh hPwMmL\"\n  >\n     One of \n  </span>\n  <div\n    class=\"sc-feUZmu bTropM\"\n  >\n    <button\n      class=\"sc-hzhJZQ ilKqWS\"\n    >\n      string\n    </button>\n    <button\n      class=\"sc-hzhJZQ emRRrf\"\n    >\n      integer\n    </button>\n  </div>\n  <div>\n    <span\n      class=\"sc-jEACwC gWyYnj\"\n      type=\"warning\"\n    >\n      Deprecated\n    </span>\n  </div>\n  <div>\n    <div>\n      <div>\n        <span\n          class=\"sc-Nxspf sc-cfxfcM cXxAXt jrGEaR\"\n        />\n        <span\n          class=\"sc-Nxspf sc-gFAWRd cXxAXt dYzdDr\"\n        >\n          string\n        </span>\n      </div>\n       \n      <div>\n        <div\n          class=\"sc-eeDRCY sc-eBMEME gTGgei fbXBig\"\n        />\n      </div>\n    </div>\n  </div>\n</div>\n`;\n"
  },
  {
    "path": "src/components/__tests__/__snapshots__/SecurityRequirement.test.tsx.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`SecurityRequirement should render SecurityDefs 1`] = `\n\"<div id=\"section/Authentication/petstore_auth\" data-section-id=\"section/Authentication/petstore_auth\" class=\"sc-dcJsrY bBkGhy\"><div class=\"sc-kAyceB hBQWIZ\"><div class=\"sc-fqkvVR oJKYx\"><h2 class=\"sc-jXbUNg fWnwAh\">petstore_auth</h2><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><p>Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.</p>\n</div><div class=\"sc-iEXKAA ebCiwb\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Security Scheme Type: </b><span>OAuth2</span></div><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Flow type: </b><code>implicit </code></div><div class=\"sc-ejfMa-d bdDYxc\"><strong> Authorization URL: </strong><code><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"http://petstore.swagger.io/api/oauth/dialog\">http://petstore.swagger.io/api/oauth/dialog</a></code></div><div class=\"sc-ejfMa-d bdDYxc\"><b> Scopes: </b></div><div class=\"sc-EgOXT kRIdPi container\" style=\"height: 4em;\"><ul><li><code>write:pets</code> - <div class=\"sc-eeDRCY sc-eBMEME sc-fhzFiK gTGgei iCmQdS hXtrri redoc-markdown\"><p>modify pets in your account</p>\n</div></li><li><code>read:pets</code> - <div class=\"sc-eeDRCY sc-eBMEME sc-fhzFiK gTGgei iCmQdS hXtrri redoc-markdown\"><p>read your pets</p>\n</div></li></ul></div><div class=\"sc-eZYNyq dIKkVb\"></div></div></div></div></div></div><div id=\"section/Authentication/GitLab_PersonalAccessToken\" data-section-id=\"section/Authentication/GitLab_PersonalAccessToken\" class=\"sc-dcJsrY bBkGhy\"><div class=\"sc-kAyceB hBQWIZ\"><div class=\"sc-fqkvVR oJKYx\"><h2 class=\"sc-jXbUNg fWnwAh\">GitLab_PersonalAccessToken</h2><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><p>GitLab Personal Access Token description</p>\n</div><div class=\"sc-iEXKAA ebCiwb\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Security Scheme Type: </b><span>API Key</span></div><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Header parameter name: </b><code>PRIVATE-TOKEN</code></div></div></div></div></div></div><div id=\"section/Authentication/GitLab_OpenIdConnect\" data-section-id=\"section/Authentication/GitLab_OpenIdConnect\" class=\"sc-dcJsrY bBkGhy\"><div class=\"sc-kAyceB hBQWIZ\"><div class=\"sc-fqkvVR oJKYx\"><h2 class=\"sc-jXbUNg fWnwAh\">GitLab_OpenIdConnect</h2><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><p>GitLab OpenIdConnect description</p>\n</div><div class=\"sc-iEXKAA ebCiwb\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Security Scheme Type: </b><span>OpenID Connect</span></div><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Connect URL: </b><code><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://gitlab.com/.well-known/openid-configuration\">https://gitlab.com/.well-known/openid-configuration</a></code></div></div></div></div></div></div><div id=\"section/Authentication/basicAuth\" data-section-id=\"section/Authentication/basicAuth\" class=\"sc-dcJsrY bBkGhy\"><div class=\"sc-kAyceB hBQWIZ\"><div class=\"sc-fqkvVR oJKYx\"><h2 class=\"sc-jXbUNg fWnwAh\">basicAuth</h2><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"></div><div class=\"sc-iEXKAA ebCiwb\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Security Scheme Type: </b><span>HTTP</span></div><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><div class=\"sc-ejfMa-d bdDYxc\"><b>HTTP Authorization Scheme: </b><code>basic</code></div><div class=\"sc-ejfMa-d bdDYxc\"></div></div></div></div></div></div>\"\n`;\n\nexports[`SecurityRequirement should render authDefinition 1`] = `\"<div class=\"sc-dkmUuB fUBzjk\"><div class=\"sc-dBmzty iDyBRL\"><h5 class=\"sc-dAlyuH sc-bDumWk jbQuod feBYnB\">Authorizations:</h5><svg class=\"sc-cwHptR iZRiKW\" version=\"1.1\" viewBox=\"0 0 24 24\" x=\"0\" xmlns=\"http://www.w3.org/2000/svg\" y=\"0\" aria-hidden=\"true\"><polygon points=\"17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 \"></polygon></svg></div><div class=\"sc-fifgRP eqIYDA\"><span class=\"sc-sLsrZ jmro\">(<span class=\"sc-kbousE iMnLRS\">API Key: <i>GitLab_PersonalAccessToken</i></span><span class=\"sc-kbousE iMnLRS\">OpenID Connect: <i>GitLab_OpenIdConnect</i></span><span class=\"sc-kbousE iMnLRS\">HTTP: <i>basicAuth</i></span>) </span><span class=\"sc-sLsrZ jmro\"><span class=\"sc-kbousE iMnLRS\">OAuth2: <i>petstore_auth</i></span></span></div></div>,\"`;\n\nexports[`SecurityRequirement should render authDefinition 2`] = `\n\"<div class=\"sc-dkmUuB KTEsk\"><div class=\"sc-dBmzty iDyBRL\"><h5 class=\"sc-dAlyuH sc-bDumWk jbQuod feBYnB\">Authorizations:</h5><svg class=\"sc-cwHptR dSJqIk\" version=\"1.1\" viewBox=\"0 0 24 24\" x=\"0\" xmlns=\"http://www.w3.org/2000/svg\" y=\"0\" aria-hidden=\"true\"><polygon points=\"17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 \"></polygon></svg></div><div class=\"sc-fifgRP gNcumo\"><span class=\"sc-sLsrZ iTheFK\">(<span class=\"sc-kbousE iMnLRS\">API Key: <i>GitLab_PersonalAccessToken</i></span><span class=\"sc-kbousE iMnLRS\">OpenID Connect: <i>GitLab_OpenIdConnect</i></span><span class=\"sc-kbousE iMnLRS\">HTTP: <i>basicAuth</i></span>) </span><span class=\"sc-sLsrZ iTheFK\"><span class=\"sc-kbousE iMnLRS\">OAuth2: <i>petstore_auth</i> (<code class=\"sc-gfoqjT dapMvh\">write:pets</code><code class=\"sc-gfoqjT dapMvh\">read:pets</code>) </span></span></div></div><div class=\"sc-iEXKAA ebCiwb\"><h5><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"11\" height=\"11\"><path fill=\"currentColor\" d=\"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z\"></path></svg> OAuth2: petstore_auth</h5><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><p>Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.</p>\n</div><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Flow type: </b><code>implicit </code></div><div class=\"sc-ejfMa-d bdDYxc\"><strong> Authorization URL: </strong><code><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"http://petstore.swagger.io/api/oauth/dialog\">http://petstore.swagger.io/api/oauth/dialog</a></code></div><div><b>Required scopes: </b><code>write:pets</code> <code>read:pets</code> </div><div class=\"sc-ejfMa-d bdDYxc\"><b> Scopes: </b></div><div class=\"sc-EgOXT kRIdPi container\" style=\"height: 4em;\"><ul><li><code>write:pets</code> - <div class=\"sc-eeDRCY sc-eBMEME sc-fhzFiK gTGgei iCmQdS hXtrri redoc-markdown\"><p>modify pets in your account</p>\n</div></li><li><code>read:pets</code> - <div class=\"sc-eeDRCY sc-eBMEME sc-fhzFiK gTGgei iCmQdS hXtrri redoc-markdown\"><p>read your pets</p>\n</div></li></ul></div><div class=\"sc-eZYNyq dIKkVb\"></div></div></div><div class=\"sc-iEXKAA ebCiwb\"><h5><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"11\" height=\"11\"><path fill=\"currentColor\" d=\"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z\"></path></svg> API Key: GitLab_PersonalAccessToken</h5><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><p>GitLab Personal Access Token description</p>\n</div><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Header parameter name: </b><code>PRIVATE-TOKEN</code></div></div></div><div class=\"sc-iEXKAA ebCiwb\"><h5><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"11\" height=\"11\"><path fill=\"currentColor\" d=\"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z\"></path></svg> OpenID Connect: GitLab_OpenIdConnect</h5><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><p>GitLab OpenIdConnect description</p>\n</div><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><div class=\"sc-ejfMa-d bdDYxc\"><b>Connect URL: </b><code><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://gitlab.com/.well-known/openid-configuration\">https://gitlab.com/.well-known/openid-configuration</a></code></div></div></div><div class=\"sc-iEXKAA ebCiwb\"><h5><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"11\" height=\"11\"><path fill=\"currentColor\" d=\"M18 10V6A6 6 0 0 0 6 6v4H3v14h18V10h-3zM8 6c0-2.206 1.794-4 4-4s4 1.794 4 4v4H8V6zm11 16H5V12h14v10z\"></path></svg> HTTP: basicAuth</h5><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"></div><div class=\"sc-eeDRCY sc-eBMEME gTGgei fMmru\"><div class=\"sc-ejfMa-d bdDYxc\"><b>HTTP Authorization Scheme: </b><code>basic</code></div><div class=\"sc-ejfMa-d bdDYxc\"></div></div></div>,\"\n`;\n"
  },
  {
    "path": "src/components/__tests__/fixtures/simple-callback.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"version\": \"1.0\",\n    \"title\": \"Foo\"\n  },\n  \"components\": {\n    \"callbacks\": {\n      \"Test\": {\n        \"/test\": {\n          \"post\": {\n            \"operationId\": \"testCallback\",\n            \"description\": \"Test callback.\",\n            \"requestBody\": {\n              \"content\": {\n                \"application/json\": {\n                  \"schema\": {\n                    \"title\": \"TestTitle\",\n                    \"type\": \"object\",\n                    \"description\": \"Test description\",\n                    \"properties\": {\n                      \"type\": {\n                        \"type\": \"string\",\n                        \"description\": \"The type of response.\",\n                        \"enum\": [\n                          \"TestResponse.Complete\"\n                        ]\n                      },\n                      \"status\": {\n                        \"type\": \"string\",\n                        \"enum\": [\n                          \"FAILURE\",\n                          \"SUCCESS\"\n                        ]\n                      }\n                    },\n                    \"required\": [\n                      \"status\"\n                    ]\n                  }\n                }\n              }\n            },\n            \"parameters\": [\n              {\n                \"name\": \"X-Test-Header\",\n                \"in\": \"header\",\n                \"required\": true,\n                \"example\": \"1\",\n                \"description\": \"This is a test header parameter\",\n                \"schema\": {\n                  \"type\": \"string\"\n                }\n              }\n            ],\n            \"responses\": {\n              \"204\": {\n                \"description\": \"Test response.\"\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}"
  },
  {
    "path": "src/components/__tests__/fixtures/simple-discriminator.json",
    "content": "{\n  \"openapi\": \"2.0.0\",\n  \"components\": {\n    \"schemas\": {\n      \"Pet\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"type\"\n        ],\n        \"discriminator\": {\n          \"propertyName\": \"type\"\n        },\n        \"properties\": {\n          \"type\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Dog\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\"\n          }\n        ],\n        \"properties\": {\n          \"packSize\": {\n            \"type\": \"number\"\n          }\n        }\n      },\n      \"Cat\": {\n        \"type\": \"object\",\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\"\n          },\n          {\n            \"properties\": {\n              \"packSize\": {\n                \"type\": \"number\"\n              }\n            }\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/components/__tests__/fixtures/simple-security-fixture.json",
    "content": "{\n  \"openapi\": \"3.0\",\n  \"info\": {\n    \"title\": \"test\",\n    \"version\": \"0\"\n  },\n  \"paths\": {\n    \"/pet\": {\n      \"put\": {\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"Add new pet to the store inventory.\",\n        \"operationId\": \"updatePet\",\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"GitLab_PersonalAccessToken\": [],\n            \"GitLab_OpenIdConnect\": [],\n            \"basicAuth\": []\n          },\n          {\n            \"petstore_auth\": [\"write:pets\", \"read:pets\"]\n          }\n        ]\n      }\n    }\n  },\n  \"components\": {\n    \"securitySchemes\": {\n      \"petstore_auth\": {\n        \"description\": \"Get access to data while protecting your account credentials.\\nOAuth2 is also a safer and more secure way to give you access.\\n\",\n        \"type\": \"oauth2\",\n        \"bearerFormat\": \"\",\n        \"flows\": {\n          \"implicit\": {\n            \"authorizationUrl\": \"http://petstore.swagger.io/api/oauth/dialog\",\n            \"scopes\": {\n              \"write:pets\": \"modify pets in your account\",\n              \"read:pets\": \"read your pets\"\n            }\n          }\n        }\n      },\n      \"GitLab_PersonalAccessToken\": {\n        \"description\": \"GitLab Personal Access Token description\",\n        \"type\": \"apiKey\",\n        \"name\": \"PRIVATE-TOKEN\",\n        \"in\": \"header\",\n        \"bearerFormat\": \"\",\n        \"flows\": {}\n      },\n      \"GitLab_OpenIdConnect\": {\n        \"description\": \"GitLab OpenIdConnect description\",\n        \"bearerFormat\": \"\",\n        \"type\": \"openIdConnect\",\n        \"openIdConnectUrl\": \"https://gitlab.com/.well-known/openid-configuration\"\n      },\n      \"basicAuth\": {\n        \"type\": \"http\",\n        \"scheme\": \"basic\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/components/index.ts",
    "content": "export * from './RedocStandalone';\nexport * from './Redoc/Redoc';\nexport * from './ApiInfo/ApiInfo';\nexport * from './ApiLogo/ApiLogo';\nexport * from './ContentItems/ContentItems';\nexport { ApiContentWrap, BackgroundStub, RedocWrap } from './Redoc/styled.elements';\nexport * from './Schema/';\nexport * from './SearchBox/SearchBox';\nexport * from './Operation/Operation';\nexport * from './Loading/Loading';\nexport * from './JsonViewer';\nexport * from './Markdown/Markdown';\nexport { StyledMarkdownBlock } from './Markdown/styled.elements';\nexport * from './SecuritySchemes/SecuritySchemes';\n\nexport * from './Responses/Response';\nexport * from './Responses/ResponseDetails';\nexport * from './Responses/ResponseHeaders';\nexport * from './Responses/ResponsesList';\nexport * from './Responses/ResponseTitle';\nexport * from './ResponseSamples/ResponseSamples';\nexport * from './PayloadSamples/PayloadSamples';\nexport * from './PayloadSamples/styled.elements';\nexport * from './MediaTypeSwitch/MediaTypesSwitch';\nexport * from './Parameters/Parameters';\nexport * from './PayloadSamples/Example';\nexport * from './DropdownOrLabel/DropdownOrLabel';\n\nexport * from './ErrorBoundary';\nexport * from './StoreBuilder';\nexport * from './OptionsProvider';\nexport * from './SideMenu/';\nexport * from './StickySidebar/StickyResponsiveSidebar';\nexport * from './SearchBox/SearchBox';\nexport * from './SchemaDefinition/SchemaDefinition';\nexport * from './SourceCode/SourceCode';\n"
  },
  {
    "path": "src/components/testProviders.tsx",
    "content": "import * as React from 'react';\nimport { ThemeProvider } from 'styled-components';\nimport defaultTheme, { resolveTheme } from '../theme';\n\nimport { PropsWithChildren } from 'react';\n\nexport default class TestThemeProvider extends React.Component<PropsWithChildren<any>> {\n  render() {\n    return (\n      <ThemeProvider theme={resolveTheme(defaultTheme)}>\n        {React.Children.only(this.props.children as any)}\n      </ThemeProvider>\n    );\n  }\n}\n\nexport function withTheme(children) {\n  return <TestThemeProvider>{children}</TestThemeProvider>;\n}\n"
  },
  {
    "path": "src/empty.js",
    "content": "module.exports = {};\n"
  },
  {
    "path": "src/index.ts",
    "content": "export * from './components';\nexport {\n  MiddlePanel,\n  Row,\n  RightPanel,\n  Section,\n  Dropdown,\n  SimpleDropdown,\n} from './common-elements/';\nexport type { DropdownOption } from './common-elements';\nexport type { OpenAPIEncoding } from './types';\nexport * from './services';\nexport * from './utils';\n\nexport * from './styled-components';\nexport { default as styled } from './styled-components';\n"
  },
  {
    "path": "src/polyfills.ts",
    "content": "import 'unfetch/polyfill/index';\nimport 'core-js/es/symbol';\n"
  },
  {
    "path": "src/services/AppStore.ts",
    "content": "import { Lambda, observe } from 'mobx';\n\nimport type { OpenAPISpec } from '../types';\nimport { loadAndBundleSpec } from '../utils/loadAndBundleSpec';\nimport { history } from './HistoryService';\nimport { MarkerService } from './MarkerService';\nimport { MenuStore } from './MenuStore';\nimport { SpecStore } from './models';\nimport { RedocNormalizedOptions } from './RedocNormalizedOptions';\nimport type { RedocRawOptions } from './RedocNormalizedOptions';\nimport { ScrollService } from './ScrollService';\nimport { SearchStore } from './SearchStore';\n\nimport { SchemaDefinition } from '../components/SchemaDefinition/SchemaDefinition';\nimport { SecurityDefs } from '../components/SecuritySchemes/SecuritySchemes';\nimport {\n  SCHEMA_DEFINITION_JSX_NAME,\n  SECURITY_DEFINITIONS_JSX_NAME,\n  OLD_SECURITY_DEFINITIONS_JSX_NAME,\n} from '../utils/openapi';\n\nimport { IS_BROWSER } from '../utils';\nimport type { StoreState } from './types';\n\nexport async function createStore(\n  spec: object,\n  specUrl: string | undefined,\n  options: RedocRawOptions = {},\n) {\n  const resolvedSpec = await loadAndBundleSpec(spec || specUrl);\n  return new AppStore(resolvedSpec, specUrl, options);\n}\n\nexport class AppStore {\n  /**\n   * deserialize store\n   * **SUPER HACKY AND NOT OPTIMAL IMPLEMENTATION**\n   */\n  // TODO:\n  static fromJS(state: StoreState): AppStore {\n    const inst = new AppStore(state.spec.data, state.spec.url, state.options, false);\n    inst.menu.activeItemIdx = state.menu.activeItemIdx || 0;\n    inst.menu.activate(inst.menu.flatItems[inst.menu.activeItemIdx]);\n    if (!inst.options.disableSearch) {\n      inst.search!.load(state.searchIndex);\n    }\n    return inst;\n  }\n\n  menu: MenuStore;\n  spec: SpecStore;\n  rawOptions: RedocRawOptions;\n  options: RedocNormalizedOptions;\n  search?: SearchStore<string>;\n  marker = new MarkerService();\n\n  private scroll: ScrollService;\n  private disposer: Lambda | null = null;\n\n  constructor(\n    spec: OpenAPISpec,\n    specUrl?: string,\n    options: RedocRawOptions = {},\n    createSearchIndex: boolean = true,\n  ) {\n    this.rawOptions = options;\n    this.options = new RedocNormalizedOptions(options, DEFAULT_OPTIONS);\n    this.scroll = new ScrollService(this.options);\n\n    // update position statically based on hash (in case of SSR)\n    MenuStore.updateOnHistory(history.currentId, this.scroll);\n\n    this.spec = new SpecStore(spec, specUrl, this.options);\n    this.menu = new MenuStore(this.spec, this.scroll, history);\n\n    if (!this.options.disableSearch) {\n      this.search = new SearchStore();\n      if (createSearchIndex) {\n        this.search.indexItems(this.menu.items);\n      }\n\n      this.disposer = observe(this.menu, 'activeItemIdx', change => {\n        this.updateMarkOnMenu(change.newValue as number);\n      });\n    }\n  }\n\n  onDidMount() {\n    this.menu.updateOnHistory();\n    this.updateMarkOnMenu(this.menu.activeItemIdx);\n  }\n\n  dispose() {\n    this.scroll.dispose();\n    this.menu.dispose();\n    if (this.search) {\n      this.search.dispose();\n    }\n    if (this.disposer != null) {\n      this.disposer();\n    }\n  }\n\n  /**\n   * serializes store\n   * **SUPER HACKY AND NOT OPTIMAL IMPLEMENTATION**\n   */\n  // TODO: improve\n  async toJS(): Promise<StoreState> {\n    return {\n      menu: {\n        activeItemIdx: this.menu.activeItemIdx,\n      },\n      spec: {\n        url: this.spec.parser.specUrl,\n        data: this.spec.parser.spec,\n      },\n      searchIndex: this.search ? await this.search.toJS() : undefined,\n      options: this.rawOptions,\n    };\n  }\n\n  private updateMarkOnMenu(idx: number) {\n    const start = Math.max(0, idx);\n    const end = Math.min(this.menu.flatItems.length, start + 5);\n\n    const elements: Element[] = [];\n    for (let i = start; i < end; i++) {\n      const elem = this.menu.getElementAt(i);\n      if (!elem) {\n        continue;\n      }\n      elements.push(elem);\n    }\n\n    if (idx === -1 && IS_BROWSER) {\n      const $description = document.querySelector('[data-role=\"redoc-description\"]');\n      const $summary = document.querySelector('[data-role=\"redoc-summary\"]');\n\n      if ($description) elements.push($description);\n      if ($summary) elements.push($summary);\n    }\n\n    this.marker.addOnly(elements);\n    this.marker.mark();\n  }\n}\n\nconst DEFAULT_OPTIONS: RedocRawOptions = {\n  allowedMdComponents: {\n    [SECURITY_DEFINITIONS_JSX_NAME]: {\n      component: SecurityDefs,\n      propsSelector: (store: AppStore) => ({\n        securitySchemes: store.spec.securitySchemes,\n      }),\n    },\n    [OLD_SECURITY_DEFINITIONS_JSX_NAME]: {\n      component: SecurityDefs,\n      propsSelector: (store: AppStore) => ({\n        securitySchemes: store.spec.securitySchemes,\n      }),\n    },\n    [SCHEMA_DEFINITION_JSX_NAME]: {\n      component: SchemaDefinition,\n      propsSelector: (store: AppStore) => ({\n        parser: store.spec.parser,\n        options: store.options,\n      }),\n    },\n  },\n};\n"
  },
  {
    "path": "src/services/ClipboardService.ts",
    "content": "const isSupported =\n  typeof document !== 'undefined' &&\n  document.queryCommandSupported &&\n  document.queryCommandSupported('copy');\n\nexport class ClipboardService {\n  static isSupported(): boolean {\n    return isSupported;\n  }\n\n  static selectElement(element: any): void {\n    let range;\n    let selection;\n    if ((document.body as any).createTextRange) {\n      range = (document.body as any).createTextRange();\n      range.moveToElementText(element);\n      range.select();\n    } else if (document.createRange && window.getSelection) {\n      selection = window.getSelection();\n      range = document.createRange();\n      range.selectNodeContents(element);\n      selection.removeAllRanges();\n      selection.addRange(range);\n    }\n  }\n\n  static deselect(): void {\n    if ((document as any).selection) {\n      (document as any).selection.empty();\n    } else if (window.getSelection) {\n      const selection = window.getSelection();\n      if (selection) {\n        selection.removeAllRanges();\n      }\n    }\n  }\n\n  static copySelected(): boolean {\n    let result;\n    try {\n      result = document.execCommand('copy');\n    } catch (err) {\n      result = false;\n    }\n    return result;\n  }\n\n  static copyElement(element: any): boolean {\n    ClipboardService.selectElement(element);\n    const res = ClipboardService.copySelected();\n    if (res) {\n      ClipboardService.deselect();\n    }\n    return res;\n  }\n\n  static copyCustom(text: string): boolean {\n    const textArea = document.createElement('textarea');\n    textArea.style.position = 'fixed';\n    textArea.style.top = '0';\n    textArea.style.left = '0';\n\n    // Ensure it has a small width and height. Setting to 1px / 1em\n    // doesn't work as this gives a negative w/h on some browsers.\n    textArea.style.width = '2em';\n    textArea.style.height = '2em';\n\n    // We don't need padding, reducing the size if it does flash render.\n    textArea.style.padding = '0';\n\n    // Clean up any borders.\n    textArea.style.border = 'none';\n    textArea.style.outline = 'none';\n    textArea.style.boxShadow = 'none';\n\n    // Avoid flash of white box if rendered for any reason.\n    textArea.style.background = 'transparent';\n\n    textArea.value = text;\n\n    document.body.appendChild(textArea);\n\n    textArea.select();\n\n    const res = ClipboardService.copySelected();\n\n    document.body.removeChild(textArea);\n    return res;\n  }\n}\n"
  },
  {
    "path": "src/services/HistoryService.ts",
    "content": "import { bind, debounce } from 'decko';\nimport { EventEmitter } from 'eventemitter3';\nimport { IS_BROWSER } from '../utils/';\n\nconst EVENT = 'hashchange';\n\nexport class HistoryService {\n  private _emiter;\n\n  constructor() {\n    this._emiter = new EventEmitter();\n    this.bind();\n  }\n\n  get currentId(): string {\n    return IS_BROWSER ? decodeURIComponent(window.location.hash.substring(1)) : '';\n  }\n\n  linkForId(id: string) {\n    if (!id) {\n      return '';\n    }\n    return '#' + id;\n  }\n\n  subscribe(cb): () => void {\n    const emmiter = this._emiter.addListener(EVENT, cb);\n    return () => emmiter.removeListener(EVENT, cb);\n  }\n\n  emit = () => {\n    this._emiter.emit(EVENT, this.currentId);\n  };\n\n  bind() {\n    if (IS_BROWSER) {\n      window.addEventListener('hashchange', this.emit, false);\n    }\n  }\n\n  dispose() {\n    if (IS_BROWSER) {\n      window.removeEventListener('hashchange', this.emit);\n    }\n  }\n\n  @bind\n  @debounce\n  replace(id: string | null, rewriteHistory: boolean = false) {\n    if (!IS_BROWSER) {\n      return;\n    }\n\n    if (id == null || id === this.currentId) {\n      return;\n    }\n    if (rewriteHistory) {\n      window.history.replaceState(\n        null,\n        '',\n        window.location.href.split('#')[0] + this.linkForId(id),\n      );\n\n      return;\n    }\n    window.history.pushState(null, '', window.location.href.split('#')[0] + this.linkForId(id));\n    this.emit();\n  }\n}\n\nexport const history = new HistoryService();\n\nif (module.hot) {\n  module.hot.dispose(() => {\n    history.dispose();\n  });\n}\n"
  },
  {
    "path": "src/services/Labels.ts",
    "content": "import type { LabelsConfig, LabelsConfigRaw } from './types';\n\nconst labels: LabelsConfig = {\n  enum: 'Enum',\n  enumSingleValue: 'Value',\n  enumArray: 'Items',\n  default: 'Default',\n  deprecated: 'Deprecated',\n  example: 'Example',\n  examples: 'Examples',\n  recursive: 'Recursive',\n  arrayOf: 'Array of ',\n  webhook: 'Event',\n  const: 'Value',\n  noResultsFound: 'No results found',\n  download: 'Download',\n  downloadSpecification: 'Download OpenAPI specification',\n  responses: 'Responses',\n  callbackResponses: 'Callback responses',\n  requestSamples: 'Request samples',\n  responseSamples: 'Response samples',\n};\n\nexport function setRedocLabels(_labels?: LabelsConfigRaw) {\n  Object.assign(labels, _labels);\n}\n\nexport function l(key: keyof LabelsConfig, idx?: number): string {\n  const label = labels[key];\n  if (idx !== undefined) {\n    return label[idx];\n  }\n  return label;\n}\n"
  },
  {
    "path": "src/services/MarkdownRenderer.ts",
    "content": "import { marked } from 'marked';\n\nimport { highlight, safeSlugify, unescapeHTMLChars } from '../utils';\nimport { RedocNormalizedOptions } from './RedocNormalizedOptions';\nimport type { MarkdownHeading, MDXComponentMeta } from './types';\n\nconst renderer = new marked.Renderer();\n\nmarked.setOptions({\n  renderer,\n  highlight: (str, lang) => {\n    return highlight(str, lang);\n  },\n});\n\nexport const LEGACY_REGEXP = '^ {0,3}<!-- ReDoc-Inject:\\\\s+?<({component}).*?/?>\\\\s+?-->\\\\s*$';\n\n// prettier-ignore\nexport const MDX_COMPONENT_REGEXP = '(?:^ {0,3}<({component})([\\\\s\\\\S]*?)>([\\\\s\\\\S]*?)</\\\\2>' // with children\n  + '|^ {0,3}<({component})([\\\\s\\\\S]*?)(?:/>|\\\\n{2,}))'; // self-closing\n\nexport const COMPONENT_REGEXP = '(?:' + LEGACY_REGEXP + '|' + MDX_COMPONENT_REGEXP + ')';\n\nexport function buildComponentComment(name: string) {\n  return `<!-- ReDoc-Inject: <${name}> -->`;\n}\n\nexport class MarkdownRenderer {\n  static containsComponent(rawText: string, componentName: string) {\n    const compRegexp = new RegExp(COMPONENT_REGEXP.replace(/{component}/g, componentName), 'gmi');\n    return compRegexp.test(rawText);\n  }\n\n  static getTextBeforeHading(md: string, heading: string): string {\n    const headingLinePos = md.search(new RegExp(`^##?\\\\s+${heading}`, 'm'));\n    if (headingLinePos > -1) {\n      return md.substring(0, headingLinePos);\n    }\n    return md;\n  }\n\n  headings: MarkdownHeading[] = [];\n  currentTopHeading: MarkdownHeading;\n\n  public parser: marked.Parser; // required initialization, `parser` is used by `marked.Renderer` instance under the hood\n  private headingEnhanceRenderer: marked.Renderer;\n  private originalHeadingRule: typeof marked.Renderer.prototype.heading;\n\n  constructor(public options?: RedocNormalizedOptions, public parentId?: string) {\n    this.parentId = parentId;\n    this.parser = new marked.Parser();\n    this.headingEnhanceRenderer = new marked.Renderer();\n    this.originalHeadingRule = this.headingEnhanceRenderer.heading.bind(\n      this.headingEnhanceRenderer,\n    );\n    this.headingEnhanceRenderer.heading = this.headingRule;\n  }\n\n  saveHeading(\n    name: string,\n    level: number,\n    container: MarkdownHeading[] = this.headings,\n    parentId?: string,\n  ): MarkdownHeading {\n    name = unescapeHTMLChars(name);\n    const item: MarkdownHeading = {\n      id: parentId\n        ? `${parentId}/${safeSlugify(name)}`\n        : `${this.parentId || 'section'}/${safeSlugify(name)}`,\n      name,\n      level,\n      items: [],\n    };\n    container.push(item);\n    return item;\n  }\n\n  flattenHeadings(container?: MarkdownHeading[]): MarkdownHeading[] {\n    if (container === undefined) {\n      return [];\n    }\n    const res: MarkdownHeading[] = [];\n    for (const heading of container) {\n      res.push(heading);\n      res.push(...this.flattenHeadings(heading.items));\n    }\n    return res;\n  }\n\n  attachHeadingsDescriptions(rawText: string) {\n    const buildRegexp = (heading: MarkdownHeading) => {\n      return new RegExp(\n        `##?\\\\s+${heading.name.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&')}\\s*(\\n|\\r\\n|$|\\s*)`,\n      );\n    };\n\n    const flatHeadings = this.flattenHeadings(this.headings);\n    if (flatHeadings.length < 1) {\n      return;\n    }\n    let prevHeading = flatHeadings[0];\n    let prevRegexp = buildRegexp(prevHeading);\n    let prevPos = rawText.search(prevRegexp);\n    for (let i = 1; i < flatHeadings.length; i++) {\n      const heading = flatHeadings[i];\n      const regexp = buildRegexp(heading);\n      const currentPos = rawText.substr(prevPos + 1).search(regexp) + prevPos + 1;\n      prevHeading.description = rawText\n        .substring(prevPos, currentPos)\n        .replace(prevRegexp, '')\n        .trim();\n\n      prevHeading = heading;\n      prevRegexp = regexp;\n      prevPos = currentPos;\n    }\n    prevHeading.description = rawText.substring(prevPos).replace(prevRegexp, '').trim();\n  }\n\n  headingRule = (\n    text: string,\n    level: 1 | 2 | 3 | 4 | 5 | 6,\n    raw: string,\n    slugger: marked.Slugger,\n  ): string => {\n    if (level === 1) {\n      this.currentTopHeading = this.saveHeading(text, level);\n    } else if (level === 2) {\n      this.saveHeading(\n        text,\n        level,\n        this.currentTopHeading && this.currentTopHeading.items,\n        this.currentTopHeading && this.currentTopHeading.id,\n      );\n    }\n    return this.originalHeadingRule(text, level, raw, slugger);\n  };\n\n  renderMd(rawText: string, extractHeadings: boolean = false): string {\n    const opts = extractHeadings ? { renderer: this.headingEnhanceRenderer } : undefined;\n\n    const res = marked(rawText.toString(), opts);\n\n    return res;\n  }\n\n  extractHeadings(rawText: string): MarkdownHeading[] {\n    this.renderMd(rawText, true);\n    this.attachHeadingsDescriptions(rawText);\n    const res = this.headings;\n    this.headings = [];\n    return res;\n  }\n\n  // regexp-based 👎: remark is slow and too big so for now using marked + regexps soup\n  renderMdWithComponents(rawText: string): Array<string | MDXComponentMeta> {\n    const components = this.options && this.options.allowedMdComponents;\n    if (!components || Object.keys(components).length === 0) {\n      return [this.renderMd(rawText)];\n    }\n\n    const names = Object.keys(components).join('|');\n    const componentsRegexp = new RegExp(COMPONENT_REGEXP.replace(/{component}/g, names), 'mig');\n\n    const htmlParts: string[] = [];\n    const componentDefs: MDXComponentMeta[] = [];\n\n    let match = componentsRegexp.exec(rawText);\n    let lasxtIdx = 0;\n    while (match) {\n      htmlParts.push(rawText.substring(lasxtIdx, match.index));\n      lasxtIdx = componentsRegexp.lastIndex;\n      const compName = match[1] || match[2] || match[5];\n      const componentMeta = components[compName];\n\n      const props = match[3] || match[6];\n      const children = match[4];\n\n      if (componentMeta) {\n        componentDefs.push({\n          component: componentMeta.component,\n          propsSelector: componentMeta.propsSelector,\n          props: { ...parseProps(props), ...componentMeta.props, children },\n        });\n      }\n      match = componentsRegexp.exec(rawText);\n    }\n    htmlParts.push(rawText.substring(lasxtIdx));\n\n    const res: any[] = [];\n    for (let i = 0; i < htmlParts.length; i++) {\n      const htmlPart = htmlParts[i];\n      if (htmlPart) {\n        res.push(this.renderMd(htmlPart));\n      }\n      if (componentDefs[i]) {\n        res.push(componentDefs[i]);\n      }\n    }\n    return res;\n  }\n}\n\nfunction parseProps(props: string): object {\n  if (!props) {\n    return {};\n  }\n\n  const regex = /([\\w-]+)\\s*=\\s*(?:{([^}]+?)}|\"([^\"]+?)\")/gim;\n  const parsed = {};\n  let match;\n  // tslint:disable-next-line\n  while ((match = regex.exec(props)) !== null) {\n    if (match[3]) {\n      // string prop match (in double quotes)\n      parsed[match[1]] = match[3];\n    } else if (match[2]) {\n      // jsx prop match (in curly braces)\n      let val;\n      try {\n        val = JSON.parse(match[2]);\n      } catch (e) {\n        /* noop */\n      }\n      parsed[match[1]] = val;\n    }\n  }\n\n  return parsed;\n}\n"
  },
  {
    "path": "src/services/MarkerService.ts",
    "content": "import * as Mark from 'mark.js';\n\nexport class MarkerService {\n  map: Map<Element, Mark> = new Map();\n\n  private prevTerm: string = '';\n\n  add(el: HTMLElement) {\n    this.map.set(el, new Mark(el));\n  }\n\n  delete(el: Element) {\n    this.map.delete(el);\n  }\n\n  addOnly(elements: Element[]) {\n    this.map.forEach((inst, elem) => {\n      if (elements.indexOf(elem) === -1) {\n        inst.unmark();\n        this.map.delete(elem);\n      }\n    });\n\n    for (const el of elements) {\n      if (!this.map.has(el)) {\n        this.map.set(el, new Mark(el as HTMLElement));\n      }\n    }\n  }\n\n  clearAll() {\n    this.unmark();\n    this.map.clear();\n  }\n\n  mark(term?: string) {\n    if (!term && !this.prevTerm) {\n      return;\n    }\n    this.map.forEach(val => {\n      val.unmark();\n      val.mark(term || this.prevTerm);\n    });\n    this.prevTerm = term || this.prevTerm;\n  }\n\n  unmark() {\n    this.map.forEach(val => val.unmark());\n    this.prevTerm = '';\n  }\n}\n"
  },
  {
    "path": "src/services/MenuBuilder.ts",
    "content": "import type { OpenAPIPaths, OpenAPITag, OpenAPISchema } from '../types';\nimport { isOperationName, JsonPointer, alphabeticallyByProp } from '../utils';\nimport { MarkdownRenderer } from './MarkdownRenderer';\nimport { GroupModel, OperationModel } from './models';\nimport type { OpenAPIParser } from './OpenAPIParser';\nimport type { RedocNormalizedOptions } from './RedocNormalizedOptions';\nimport type { ContentItemModel, TagGroup, TagInfo, TagsInfoMap } from './types';\n\nexport const GROUP_DEPTH = 0;\n\nexport class MenuBuilder {\n  /**\n   * Builds page content structure based on tags\n   */\n  static buildStructure(\n    parser: OpenAPIParser,\n    options: RedocNormalizedOptions,\n  ): ContentItemModel[] {\n    const spec = parser.spec;\n    const { schemaDefinitionsTagName } = options;\n\n    const items: ContentItemModel[] = [];\n    const tags = [...(spec.tags || [])];\n    const hasAutogenerated = tags.find(\n      tag => tag?.name === schemaDefinitionsTagName,\n    );\n\n    if (!hasAutogenerated && schemaDefinitionsTagName) {\n      tags.push({ name: schemaDefinitionsTagName });\n    }\n    const tagsMap = MenuBuilder.getTagsWithOperations(parser, tags);\n\n    items.push(...MenuBuilder.addMarkdownItems(spec.info.description || '', undefined, 1, options));\n    if (spec['x-tagGroups'] && spec['x-tagGroups'].length > 0) {\n      items.push(\n        ...MenuBuilder.getTagGroupsItems(parser, undefined, spec['x-tagGroups'], tagsMap, options),\n      );\n    } else {\n      items.push(...MenuBuilder.getTagsItems(parser, tagsMap, undefined, undefined, options));\n    }\n\n    return items;\n  }\n\n  /**\n   * extracts items from markdown description\n   * @param description - markdown source\n   */\n  static addMarkdownItems(\n    description: string,\n    parent: GroupModel | undefined,\n    initialDepth: number,\n    options: RedocNormalizedOptions,\n  ): ContentItemModel[] {\n    const renderer = new MarkdownRenderer(options, parent?.id);\n    const headings = renderer.extractHeadings(description || '');\n\n    if (headings.length && parent && parent.description) {\n      parent.description = MarkdownRenderer.getTextBeforeHading(\n        parent.description,\n        headings[0].name,\n      );\n    }\n\n    const mapHeadingsDeep = (_parent, items, depth = 1) =>\n      items.map(heading => {\n        const group = new GroupModel('section', heading, _parent);\n        group.depth = depth;\n        if (heading.items) {\n          group.items = mapHeadingsDeep(group, heading.items, depth + 1);\n        }\n\n        return group;\n      });\n\n    return mapHeadingsDeep(parent, headings, initialDepth);\n  }\n\n  /**\n   * Returns array of OperationsGroup items for the tag groups (x-tagGroups vendor extension)\n   * @param tags value of `x-tagGroups` vendor extension\n   */\n  static getTagGroupsItems(\n    parser: OpenAPIParser,\n    parent: GroupModel | undefined,\n    groups: TagGroup[],\n    tags: TagsInfoMap,\n    options: RedocNormalizedOptions,\n  ): GroupModel[] {\n    const res: GroupModel[] = [];\n    for (const group of groups) {\n      const item = new GroupModel('group', group, parent);\n      item.depth = GROUP_DEPTH;\n      item.items = MenuBuilder.getTagsItems(parser, tags, item, group, options);\n      res.push(item);\n    }\n    // TODO checkAllTagsUsedInGroups\n    return res;\n  }\n\n  /**\n   * Returns array of OperationsGroup items for the tags of the group or for all tags\n   * @param parser\n   * @param tagsMap tags info returned from `getTagsWithOperations`\n   * @param parent parent item\n   * @param group group which this tag belongs to. if not provided gets all tags\n   * @param options normalized options\n   */\n  static getTagsItems(\n    parser: OpenAPIParser,\n    tagsMap: TagsInfoMap,\n    parent: GroupModel | undefined,\n    group: TagGroup | undefined,\n    options: RedocNormalizedOptions,\n  ): ContentItemModel[] {\n    let tagNames;\n\n    if (group === undefined) {\n      tagNames = Object.keys(tagsMap); // all tags\n    } else {\n      tagNames = group.tags;\n    }\n\n    const tags = tagNames.map(tagName => {\n      if (!tagsMap[tagName]) {\n        console.warn(`Non-existing tag \"${tagName}\" is added to the group \"${group!.name}\"`);\n        return null;\n      }\n      tagsMap[tagName].used = true;\n      return tagsMap[tagName];\n    });\n\n    const res: Array<GroupModel | OperationModel> = [];\n    for (const tag of tags) {\n      if (!tag) {\n        continue;\n      }\n      const item = new GroupModel('tag', tag, parent);\n      item.depth = GROUP_DEPTH + 1;\n\n      // don't put empty tag into content, instead put its operations\n      if (tag.name === '') {\n        const items = [\n          ...MenuBuilder.addMarkdownItems(tag.description || '', item, item.depth + 1, options),\n          ...this.getOperationsItems(parser, undefined, tag, item.depth + 1, options),\n        ];\n        res.push(...items);\n        continue;\n      }\n\n      const relatedSchemas = this.getTagRelatedSchema({\n        parser,\n        tag,\n        parent: item,\n        schemaDefinitionsTagName: options.schemaDefinitionsTagName,\n      });\n\n      item.items = [\n        ...relatedSchemas,\n        ...MenuBuilder.addMarkdownItems(tag.description || '', item, item.depth + 1, options),\n        ...this.getOperationsItems(parser, item, tag, item.depth + 1, options),\n      ];\n\n      res.push(item);\n    }\n\n    if (options.sortTagsAlphabetically) {\n      res.sort(alphabeticallyByProp<GroupModel | OperationModel>('name'));\n    }\n\n    return res;\n  }\n\n  /**\n   * Returns array of Operation items for the tag\n   * @param parser\n   * @param parent parent OperationsGroup\n   * @param tag tag info returned from `getTagsWithOperations`\n   * @param depth items depth\n   * @param options - normalized options\n   */\n  static getOperationsItems(\n    parser: OpenAPIParser,\n    parent: GroupModel | undefined,\n    tag: TagInfo,\n    depth: number,\n    options: RedocNormalizedOptions,\n  ): OperationModel[] {\n    if (tag.operations.length === 0) {\n      return [];\n    }\n\n    const res: OperationModel[] = [];\n    for (const operationInfo of tag.operations) {\n      const operation = new OperationModel(parser, operationInfo, parent, options);\n      operation.depth = depth;\n      res.push(operation);\n    }\n\n    if (options.sortOperationsAlphabetically) {\n      res.sort(alphabeticallyByProp<OperationModel>('name'));\n    }\n\n    return res;\n  }\n\n  /**\n   * collects tags and maps each tag to list of operations belonging to this tag\n   */\n  static getTagsWithOperations(parser: OpenAPIParser, explicitTags: OpenAPITag[]): TagsInfoMap {\n    const { spec } = parser;\n    const tags: TagsInfoMap = {};\n    const webhooks = spec['x-webhooks'] || spec.webhooks;\n    for (const tag of explicitTags || []) {\n      tags[tag.name] = { ...tag, operations: [] };\n    }\n\n    if (webhooks) {\n      getTags(parser, webhooks, true);\n    }\n\n    if (spec.paths) {\n      getTags(parser, spec.paths);\n    }\n\n    function getTags(parser: OpenAPIParser, paths: OpenAPIPaths, isWebhook?: boolean) {\n      for (const pathName of Object.keys(paths)) {\n        const path = paths[pathName];\n        const operations = Object.keys(path).filter(isOperationName);\n        for (const operationName of operations) {\n          const operationInfo = path[operationName];\n          if (path.$ref) {\n            const { resolved: resolvedPaths } = parser.deref<OpenAPIPaths>(path as OpenAPIPaths);\n            getTags(parser, { [pathName]: resolvedPaths }, isWebhook);\n            continue;\n          }\n          let operationTags = operationInfo?.tags;\n\n          if (!operationTags || !operationTags.length) {\n            // empty tag\n            operationTags = [''];\n          }\n\n          for (const tagName of operationTags) {\n            let tag = tags[tagName];\n            if (tag === undefined) {\n              tag = {\n                name: tagName,\n                operations: [],\n              };\n              tags[tagName] = tag;\n            }\n            if (tag['x-traitTag']) {\n              continue;\n            }\n            tag.operations.push({\n              ...operationInfo,\n              pathName,\n              pointer: JsonPointer.compile(['paths', pathName, operationName]),\n              httpVerb: operationName,\n              pathParameters: path.parameters || [],\n              pathServers: path.servers,\n              isWebhook: !!isWebhook,\n            });\n          }\n        }\n      }\n    }\n    return tags;\n  }\n\n  static getTagRelatedSchema({\n    parser,\n    tag,\n    parent,\n    schemaDefinitionsTagName,\n  }: {\n    parser: OpenAPIParser;\n    tag: TagInfo;\n    parent: GroupModel;\n    schemaDefinitionsTagName?: string;\n  }): GroupModel[] {\n    const defaultTags = schemaDefinitionsTagName ? [schemaDefinitionsTagName] : [];\n\n    return Object.entries(parser.spec.components?.schemas || {})\n      .map(([schemaName, schema]) => {\n        const schemaTags = schema['x-tags'] || defaultTags;\n        if (!schemaTags?.includes(tag.name)) return null;\n\n        const item = new GroupModel(\n          'schema',\n          {\n            name: schemaName,\n            'x-displayName': `${(schema as OpenAPISchema).title || schemaName}`,\n            description: `<SchemaDefinition showWriteOnly={true} schemaRef=\"#/components/schemas/${schemaName}\" />`,\n          } as OpenAPITag,\n          parent,\n        );\n        item.depth = parent.depth + 1;\n        return item;\n      })\n      .filter(Boolean) as GroupModel[];\n  }\n}\n"
  },
  {
    "path": "src/services/MenuStore.ts",
    "content": "import { action, observable, makeObservable } from 'mobx';\nimport { querySelector } from '../utils/dom';\nimport { escapeHTMLAttrChars, flattenByProp, SECURITY_SCHEMES_SECTION_PREFIX } from '../utils';\n\nimport { history as historyInst, HistoryService } from './HistoryService';\nimport { GROUP_DEPTH } from './MenuBuilder';\n\nimport type { SpecStore } from './models';\nimport type { ScrollService } from './ScrollService';\nimport type { IMenuItem } from './types';\n\n/** Generic interface for MenuItems */\n\nexport const SECTION_ATTR = 'data-section-id';\n\n/**\n * Stores all side-menu related information\n */\nexport class MenuStore {\n  /**\n   * Statically try update scroll position\n   * Used before hydrating from server-side rendered html to scroll page faster\n   */\n  static updateOnHistory(id: string = historyInst.currentId, scroll: ScrollService) {\n    if (!id) {\n      return;\n    }\n    scroll.scrollIntoViewBySelector(`[${SECTION_ATTR}=\"${escapeHTMLAttrChars(id)}\"]`);\n  }\n\n  /**\n   * active item absolute index (when flattened). -1 means nothing is selected\n   */\n  @observable\n  activeItemIdx: number = -1;\n\n  /**\n   * whether sidebar with menu is opened or not\n   */\n  @observable\n  sideBarOpened: boolean = false;\n\n  items: IMenuItem[];\n  flatItems: IMenuItem[];\n\n  /**\n   * cached flattened menu items to support absolute indexing\n   */\n  private _unsubscribe: () => void;\n  private _hashUnsubscribe: () => void;\n\n  /**\n   *\n   * @param spec [SpecStore](#SpecStore) which contains page content structure\n   * @param scroll scroll service instance used by this menu\n   */\n  constructor(spec: SpecStore, public scroll: ScrollService, public history: HistoryService) {\n    makeObservable(this);\n\n    this.items = spec.contentItems;\n\n    this.flatItems = flattenByProp(this.items || [], 'items');\n    this.flatItems.forEach((item, idx) => (item.absoluteIdx = idx));\n\n    this.subscribe();\n  }\n\n  subscribe() {\n    this._unsubscribe = this.scroll.subscribe(this.updateOnScroll);\n    this._hashUnsubscribe = this.history.subscribe(this.updateOnHistory);\n  }\n\n  @action\n  toggleSidebar() {\n    this.sideBarOpened = this.sideBarOpened ? false : true;\n  }\n\n  @action\n  closeSidebar() {\n    this.sideBarOpened = false;\n  }\n\n  /**\n   * update active items on scroll\n   * @param isScrolledDown whether last scroll was downside\n   */\n  updateOnScroll = (isScrolledDown: boolean): void => {\n    const step = isScrolledDown ? 1 : -1;\n    let itemIdx = this.activeItemIdx;\n    while (true) {\n      if (itemIdx === -1 && !isScrolledDown) {\n        break;\n      }\n\n      if (itemIdx >= this.flatItems.length - 1 && isScrolledDown) {\n        break;\n      }\n\n      if (isScrolledDown) {\n        const el = this.getElementAtOrFirstChild(itemIdx + 1);\n        if (this.scroll.isElementBellow(el)) {\n          break;\n        }\n      } else {\n        const el = this.getElementAt(itemIdx);\n        if (this.scroll.isElementAbove(el)) {\n          break;\n        }\n      }\n      itemIdx += step;\n    }\n\n    this.activate(this.flatItems[itemIdx], true, true);\n  };\n\n  /**\n   * update active items on hash change\n   * @param id current hash\n   */\n  updateOnHistory = (id: string = this.history.currentId) => {\n    if (!id) {\n      return;\n    }\n    let item: IMenuItem | undefined;\n\n    item = this.flatItems.find(i => i.id === id);\n\n    if (item) {\n      this.activateAndScroll(item, false);\n    } else {\n      if (id.startsWith(SECURITY_SCHEMES_SECTION_PREFIX)) {\n        item = this.flatItems.find(i => SECURITY_SCHEMES_SECTION_PREFIX.startsWith(i.id));\n        this.activateAndScroll(item, false);\n      }\n      this.scroll.scrollIntoViewBySelector(`[${SECTION_ATTR}=\"${escapeHTMLAttrChars(id)}\"]`);\n    }\n  };\n\n  /**\n   * get section/operation DOM Node related to the item or null if it doesn't exist\n   * @param idx item absolute index\n   */\n  getElementAt(idx: number): Element | null {\n    const item = this.flatItems[idx];\n    return (item && querySelector(`[${SECTION_ATTR}=\"${escapeHTMLAttrChars(item.id)}\"]`)) || null;\n  }\n\n  /**\n   * get section/operation DOM Node related to the item or if it is group item, returns first item of the group\n   * @param idx item absolute index\n   */\n  getElementAtOrFirstChild(idx: number): Element | null {\n    let item = this.flatItems[idx];\n    if (item && item.type === 'group') {\n      item = item.items[0];\n    }\n    return (item && querySelector(`[${SECTION_ATTR}=\"${escapeHTMLAttrChars(item.id)}\"]`)) || null;\n  }\n\n  /**\n   * current active item\n   */\n  get activeItem(): IMenuItem {\n    return this.flatItems[this.activeItemIdx] || undefined;\n  }\n\n  getItemById = (id: string) => {\n    return this.flatItems.find(item => item.id === id);\n  };\n\n  /**\n   * activate menu item\n   * @param item item to activate\n   * @param updateLocation [true] whether to update location\n   * @param rewriteHistory [false] whether to rewrite browser history (do not create new entry)\n   */\n  @action\n  activate(\n    item: IMenuItem | undefined,\n    updateLocation: boolean = true,\n    rewriteHistory: boolean = false,\n  ) {\n    if ((this.activeItem && this.activeItem.id) === (item && item.id)) {\n      return;\n    }\n\n    if (item && item.type === 'group') {\n      return;\n    }\n\n    this.deactivate(this.activeItem);\n    if (!item) {\n      this.activeItemIdx = -1;\n      this.history.replace('', rewriteHistory);\n      return;\n    }\n\n    // do not allow activating group items\n    // TODO: control over options\n    if (item.depth <= GROUP_DEPTH) {\n      return;\n    }\n\n    this.activeItemIdx = item.absoluteIdx!;\n    if (updateLocation) {\n      this.history.replace(encodeURI(item.id), rewriteHistory);\n    }\n\n    item.activate();\n    item.expand();\n  }\n\n  /**\n   * makes item and all the parents not active\n   * @param item item to deactivate\n   */\n  deactivate(item: IMenuItem | undefined) {\n    if (item === undefined) {\n      return;\n    }\n    item.deactivate();\n    while (item !== undefined) {\n      item.collapse();\n      item = item.parent;\n    }\n  }\n\n  /**\n   * activate menu item and scroll to it\n   * @see MenuStore.activate\n   */\n  @action.bound\n  activateAndScroll(\n    item: IMenuItem | undefined,\n    updateLocation?: boolean,\n    rewriteHistory?: boolean,\n  ) {\n    // item here can be a copy from search results so find corresponding item from menu\n    const menuItem = (item && this.getItemById(item.id)) || item;\n    this.activate(menuItem, updateLocation, rewriteHistory);\n    this.scrollToActive();\n    if (!menuItem || !menuItem.items.length) {\n      this.closeSidebar();\n    }\n  }\n\n  /**\n   * scrolls to active section\n   */\n  scrollToActive(): void {\n    this.scroll.scrollIntoView(this.getElementAt(this.activeItemIdx));\n  }\n\n  dispose() {\n    this._unsubscribe();\n    this._hashUnsubscribe();\n  }\n}\n"
  },
  {
    "path": "src/services/OpenAPIParser.ts",
    "content": "import type { OpenAPIRef, OpenAPISchema, OpenAPISpec } from '../types';\nimport { IS_BROWSER, getDefinitionName } from '../utils/';\nimport { JsonPointer } from '../utils/JsonPointer';\n\nimport { RedocNormalizedOptions } from './RedocNormalizedOptions';\nimport type { MergedOpenAPISchema } from './types';\n\nconst MAX_DEREF_DEPTH = 999; // prevent circular detection crashes by adding hard limit on deref depth\n\n/**\n * Loads and keeps spec. Provides raw spec operations\n */\n\nexport function pushRef(stack: string[], ref?: string): string[] {\n  return ref && stack[stack.length - 1] !== ref ? [...stack, ref] : stack;\n}\n\nexport function concatRefStacks(base: string[], stack?: string[]): string[] {\n  return stack ? base.concat(stack) : base;\n}\n\nexport class OpenAPIParser {\n  specUrl?: string;\n  spec: OpenAPISpec;\n\n  private readonly allowMergeRefs: boolean = false;\n\n  constructor(\n    spec: OpenAPISpec,\n    specUrl?: string,\n    private options: RedocNormalizedOptions = new RedocNormalizedOptions({}),\n  ) {\n    this.validate(spec);\n\n    this.spec = spec;\n    this.allowMergeRefs = spec.openapi.startsWith('3.1');\n\n    const href = IS_BROWSER ? window.location.href : '';\n    if (typeof specUrl === 'string') {\n      this.specUrl = href ? new URL(specUrl, href).href : specUrl;\n    }\n  }\n\n  validate(spec: Record<string, any>): void {\n    if (spec.openapi === undefined) {\n      throw new Error('Document must be valid OpenAPI 3.0.0 definition');\n    }\n  }\n\n  /**\n   * get spec part by JsonPointer ($ref)\n   */\n  byRef = <T = any>(ref: string): T | undefined => {\n    let res;\n    if (!this.spec) {\n      return;\n    }\n    if (ref.charAt(0) !== '#') {\n      ref = '#' + ref;\n    }\n    ref = decodeURIComponent(ref);\n    try {\n      res = JsonPointer.get(this.spec, ref);\n    } catch (e) {\n      // do nothing\n    }\n    return res || {};\n  };\n\n  /**\n   * checks if the object is OpenAPI reference (contains $ref property)\n   */\n  isRef<T>(obj: OpenAPIRef | T): obj is OpenAPIRef {\n    if (!obj) {\n      return false;\n    }\n    obj = <OpenAPIRef>obj;\n    return obj.$ref !== undefined && obj.$ref !== null;\n  }\n\n  /**\n   * Resolve given reference object or return as is if it is not a reference\n   * @param obj object to dereference\n   * @param forceCircular whether to dereference even if it is circular ref\n   * @param mergeAsAllOf\n   */\n  deref<T>(\n    obj: OpenAPIRef | T,\n    baseRefsStack: string[] = [],\n    mergeAsAllOf = false,\n  ): { resolved: T; refsStack: string[] } {\n    // this can be set by all of when it mergers props from different sources\n    const objRefsStack = obj?.['x-refsStack'];\n    baseRefsStack = concatRefStacks(baseRefsStack, objRefsStack);\n\n    if (this.isRef(obj)) {\n      const schemaName = getDefinitionName(obj.$ref);\n      if (schemaName && this.options.ignoreNamedSchemas.has(schemaName)) {\n        return { resolved: { type: 'object', title: schemaName } as T, refsStack: baseRefsStack };\n      }\n\n      let resolved = this.byRef<T>(obj.$ref);\n      if (!resolved) {\n        throw new Error(`Failed to resolve $ref \"${obj.$ref}\"`);\n      }\n\n      let refsStack = baseRefsStack;\n      if (baseRefsStack.includes(obj.$ref) || baseRefsStack.length > MAX_DEREF_DEPTH) {\n        resolved = Object.assign({}, resolved, { 'x-circular-ref': true });\n      } else if (this.isRef(resolved)) {\n        const res = this.deref(resolved, baseRefsStack, mergeAsAllOf);\n        refsStack = res.refsStack;\n        resolved = res.resolved;\n      }\n\n      refsStack = pushRef(baseRefsStack, obj.$ref);\n      resolved = this.allowMergeRefs ? this.mergeRefs(obj, resolved, mergeAsAllOf) : resolved;\n\n      return { resolved, refsStack };\n    }\n    return {\n      resolved: obj,\n      refsStack: concatRefStacks(baseRefsStack, objRefsStack),\n    };\n  }\n\n  mergeRefs<T>(ref: OpenAPIRef, resolved: T, mergeAsAllOf: boolean): T {\n    // eslint-disable-next-line @typescript-eslint/no-unused-vars\n    const { $ref, ...rest } = ref;\n    const keys = Object.keys(rest);\n    if (keys.length === 0) {\n      return resolved;\n    }\n    if (\n      mergeAsAllOf &&\n      keys.some(\n        k =>\n          ![\n            'description',\n            'title',\n            'externalDocs',\n            'x-refsStack',\n            'x-parentRefs',\n            'readOnly',\n            'writeOnly',\n          ].includes(k),\n      )\n    ) {\n      const { description, title, readOnly, writeOnly, ...restSchema } = rest as OpenAPISchema;\n      return {\n        allOf: [{ description, title, readOnly, writeOnly }, resolved, restSchema],\n      } as T;\n    } else {\n      // small optimization\n      return {\n        ...(resolved as object),\n        ...rest,\n      } as T;\n    }\n  }\n\n  /**\n   * Merge allOf constraints.\n   * @param schema schema with allOF\n   * @param $ref pointer of the schema\n   * @param forceCircular whether to dereference children even if it is a circular ref\n   * @param used$Refs\n   */\n  mergeAllOf(\n    schema: MergedOpenAPISchema,\n    $ref: string | undefined,\n    refsStack: string[],\n  ): MergedOpenAPISchema {\n    if (schema['x-circular-ref']) {\n      return schema;\n    }\n\n    schema = this.hoistOneOfs(schema, refsStack);\n\n    if (schema.allOf === undefined) {\n      return schema;\n    }\n\n    let receiver: MergedOpenAPISchema = {\n      ...schema,\n      'x-parentRefs': [],\n      allOf: undefined,\n      title: schema.title || getDefinitionName($ref),\n    };\n\n    // avoid mutating inner objects\n    if (receiver.properties !== undefined && typeof receiver.properties === 'object') {\n      receiver.properties = { ...receiver.properties };\n    }\n    if (receiver.items !== undefined && typeof receiver.items === 'object') {\n      receiver.items = { ...receiver.items };\n    }\n\n    const allOfSchemas = uniqByPropIncludeMissing(\n      schema.allOf\n        .map((subSchema: OpenAPISchema) => {\n          const { resolved, refsStack: subRefsStack } = this.deref(subSchema, refsStack, true);\n\n          const subRef = subSchema.$ref || undefined;\n          const subMerged = this.mergeAllOf(resolved, subRef, subRefsStack);\n          if (subMerged['x-circular-ref'] && subMerged.allOf) {\n            // if mergeAllOf is circular and still contains allOf, we should ignore it\n            return undefined;\n          }\n          if (subRef) {\n            // collect information for implicit descriminator lookup\n            receiver['x-parentRefs']?.push(...(subMerged['x-parentRefs'] || []), subRef);\n          }\n          return {\n            $ref: subRef,\n            refsStack: pushRef(subRefsStack, subRef),\n            schema: subMerged,\n          };\n        })\n        .filter(child => child !== undefined) as Array<{\n        schema: MergedOpenAPISchema;\n        refsStack: string[];\n        $ref?: string;\n      }>,\n      '$ref',\n    );\n\n    for (const { schema: subSchema, refsStack: subRefsStack } of allOfSchemas) {\n      const {\n        type,\n        enum: enumProperty,\n        properties,\n        items,\n        required,\n        title,\n        description,\n        readOnly,\n        writeOnly,\n        oneOf,\n        anyOf,\n        'x-circular-ref': isCircular,\n        ...otherConstraints\n      } = subSchema;\n\n      if (receiver.type !== type && receiver.type !== undefined && type !== undefined) {\n        console.warn(`Incompatible types in allOf at \"${$ref}\": \"${receiver.type}\" and \"${type}\"`);\n      }\n\n      if (type !== undefined) {\n        if (Array.isArray(type) && Array.isArray(receiver.type)) {\n          receiver.type = [...type, ...receiver.type];\n        } else {\n          receiver.type = type;\n        }\n      }\n\n      if (enumProperty !== undefined) {\n        if (Array.isArray(enumProperty) && Array.isArray(receiver.enum)) {\n          receiver.enum = Array.from(new Set([...enumProperty, ...receiver.enum]));\n        } else {\n          receiver.enum = enumProperty;\n        }\n      }\n\n      if (properties !== undefined && typeof properties === 'object') {\n        receiver.properties = receiver.properties || {};\n        for (const prop in properties) {\n          const propRefsStack = concatRefStacks(subRefsStack, properties[prop]?.['x-refsStack']);\n          if (!receiver.properties[prop]) {\n            receiver.properties[prop] = {\n              ...properties[prop],\n              'x-refsStack': propRefsStack,\n            } as MergedOpenAPISchema;\n          } else if (!isCircular) {\n            // merge inner properties\n            const mergedProp = this.mergeAllOf(\n              {\n                allOf: [\n                  receiver.properties[prop],\n                  { ...properties[prop], 'x-refsStack': propRefsStack } as any,\n                ],\n                'x-refsStack': propRefsStack,\n              },\n              $ref + '/properties/' + prop,\n              propRefsStack,\n            );\n            receiver.properties[prop] = mergedProp;\n          }\n        }\n      }\n\n      if (items !== undefined && !isCircular) {\n        const receiverItems =\n          typeof receiver.items === 'boolean'\n            ? {}\n            : (Object.assign({}, receiver.items) as OpenAPISchema);\n        const subSchemaItems =\n          typeof subSchema.items === 'boolean'\n            ? {}\n            : (Object.assign({}, subSchema.items) as OpenAPISchema);\n        // merge inner properties\n        receiver.items = this.mergeAllOf(\n          {\n            allOf: [receiverItems, subSchemaItems],\n          },\n          $ref + '/items',\n          subRefsStack,\n        );\n      }\n      if (oneOf !== undefined) {\n        receiver.oneOf = oneOf;\n      }\n\n      if (anyOf !== undefined) {\n        receiver.anyOf = anyOf;\n      }\n\n      if (required !== undefined) {\n        receiver.required = [...(receiver.required || []), ...required];\n      }\n\n      // merge rest of constraints\n      // TODO: do more intelligent merge\n      receiver = {\n        ...receiver,\n        title: receiver.title || title,\n        description: receiver.description || description,\n        readOnly: receiver.readOnly !== undefined ? receiver.readOnly : readOnly,\n        writeOnly: receiver.writeOnly !== undefined ? receiver.writeOnly : writeOnly,\n        'x-circular-ref': receiver['x-circular-ref'] || isCircular,\n        ...otherConstraints,\n      };\n    }\n\n    return receiver;\n  }\n\n  /**\n   * Find all derived definitions among #/components/schemas from any of $refs\n   * returns map of definition pointer to definition name\n   * @param $refs array of references to find derived from\n   */\n  findDerived($refs: string[]): Record<string, string[] | string> {\n    const res: Record<string, string[]> = {};\n    const schemas = (this.spec.components && this.spec.components.schemas) || {};\n    for (const defName in schemas) {\n      const { resolved: def } = this.deref(schemas[defName]);\n      if (\n        def.allOf !== undefined &&\n        def.allOf.find(\n          (obj: OpenAPISchema) => obj.$ref !== undefined && $refs.indexOf(obj.$ref) > -1,\n        )\n      ) {\n        res['#/components/schemas/' + defName] = [def['x-discriminator-value'] || defName];\n      }\n    }\n    return res;\n  }\n\n  private hoistOneOfs(schema: OpenAPISchema, refsStack: string[]) {\n    if (schema.allOf === undefined) {\n      return schema;\n    }\n\n    const allOf = schema.allOf;\n    for (let i = 0; i < allOf.length; i++) {\n      const { oneOf, ...sub } = allOf[i];\n      if (!oneOf) {\n        continue;\n      }\n      if (Array.isArray(oneOf)) {\n        const beforeAllOf = allOf.slice(0, i);\n        const afterAllOf = allOf.slice(i + 1);\n        const siblingValues = Object.keys(sub).length > 0 ? [sub] : [];\n        return {\n          oneOf: oneOf.map((part: OpenAPISchema) => {\n            return {\n              allOf: [...beforeAllOf, ...siblingValues, part, ...afterAllOf],\n              'x-refsStack': refsStack,\n            };\n          }),\n        };\n      }\n    }\n\n    return schema;\n  }\n}\n\n/**\n * Unique array by property, missing properties are included\n */\nfunction uniqByPropIncludeMissing<T extends object>(arr: T[], prop: keyof T): T[] {\n  const seen = new Set();\n  return arr.filter(item => {\n    const k = item[prop];\n    if (!k) return true;\n    return k && !seen.has(k) && seen.add(k);\n  });\n}\n"
  },
  {
    "path": "src/services/RedocNormalizedOptions.ts",
    "content": "import defaultTheme, { ResolvedThemeInterface, resolveTheme, ThemeInterface } from '../theme';\nimport { querySelector } from '../utils/dom';\nimport { isArray, isNumeric, mergeObjects } from '../utils/helpers';\n\nimport { setRedocLabels } from './Labels';\nimport { SideNavStyleEnum } from './types';\nimport type { LabelsConfigRaw, MDXComponentMeta } from './types';\n\nexport type DownloadUrlsConfig = {\n  title?: string;\n  url: string;\n}[];\n\nexport interface RedocRawOptions {\n  theme?: ThemeInterface;\n  scrollYOffset?: number | string | (() => number);\n  hideHostname?: boolean | string;\n  expandResponses?: string | 'all';\n  requiredPropsFirst?: boolean | string; // remove in next major release\n  sortRequiredPropsFirst?: boolean | string;\n  sortPropsAlphabetically?: boolean | string;\n  sortEnumValuesAlphabetically?: boolean | string;\n  sortOperationsAlphabetically?: boolean | string;\n  sortTagsAlphabetically?: boolean | string;\n  nativeScrollbars?: boolean | string;\n  pathInMiddlePanel?: boolean | string;\n  untrustedSpec?: boolean | string; // remove in next major release\n  sanitize?: boolean | string;\n  hideLoading?: boolean | string;\n  hideDownloadButton?: boolean | string; // remove in next major release\n  hideDownloadButtons?: boolean | string;\n  downloadFileName?: string;\n  downloadDefinitionUrl?: string;\n  downloadUrls?: DownloadUrlsConfig;\n  disableSearch?: boolean | string;\n  onlyRequiredInSamples?: boolean | string;\n  showExtensions?: boolean | string | string[];\n  sideNavStyle?: SideNavStyleEnum;\n  hideSingleRequestSampleTab?: boolean | string;\n  hideRequestPayloadSample?: boolean;\n  menuToggle?: boolean | string;\n  jsonSampleExpandLevel?: number | string | 'all'; // remove in next major release\n  jsonSamplesExpandLevel?: number | string | 'all';\n  hideSchemaTitles?: boolean | string;\n  simpleOneOfTypeLabel?: boolean | string;\n  payloadSampleIdx?: number;\n  expandSingleSchemaField?: boolean | string;\n  schemaExpansionLevel?: number | string | 'all'; // remove in next major release\n  schemasExpansionLevel?: number | string | 'all';\n  schemaDefinitionsTagName?: string;\n  showObjectSchemaExamples?: boolean | string;\n  showSecuritySchemeType?: boolean;\n  hideSecuritySection?: boolean;\n\n  unstable_ignoreMimeParameters?: boolean;\n\n  allowedMdComponents?: Record<string, MDXComponentMeta>;\n\n  labels?: LabelsConfigRaw;\n\n  enumSkipQuotes?: boolean | string;\n\n  expandDefaultServerVariables?: boolean;\n  maxDisplayedEnumValues?: number;\n  ignoreNamedSchemas?: string[] | string;\n  hideSchemaPattern?: boolean;\n  generatedPayloadSamplesMaxDepth?: number; // remove in next major release\n  generatedSamplesMaxDepth?: number;\n  nonce?: string;\n  hideFab?: boolean;\n  minCharacterLengthToInitSearch?: number;\n  showWebhookVerb?: boolean;\n  hidePropertiesPrefix?: boolean;\n}\n\nexport function argValueToBoolean(val?: string | boolean, defaultValue?: boolean): boolean {\n  if (val === undefined) {\n    return defaultValue || false;\n  }\n  if (typeof val === 'string') {\n    return val !== 'false';\n  }\n  return val;\n}\n\nfunction argValueToNumber(value: number | string | undefined): number | undefined {\n  if (typeof value === 'string') {\n    return parseInt(value, 10);\n  }\n\n  if (typeof value === 'number') {\n    return value;\n  }\n}\n\nfunction argValueToExpandLevel(value?: number | string | undefined, defaultValue = 0): number {\n  if (value === 'all') return Infinity;\n\n  return argValueToNumber(value) || defaultValue;\n}\n\nexport class RedocNormalizedOptions {\n  static normalizeExpandResponses(value: RedocRawOptions['expandResponses']) {\n    if (value === 'all') {\n      return 'all';\n    }\n    if (typeof value === 'string') {\n      const res = {};\n      value.split(',').forEach(code => {\n        res[code.trim()] = true;\n      });\n      return res;\n    } else if (value !== undefined) {\n      console.warn(\n        `expandResponses must be a string but received value \"${value}\" of type ${typeof value}`,\n      );\n    }\n    return {};\n  }\n\n  static normalizeHideHostname(value: RedocRawOptions['hideHostname']): boolean {\n    return !!value;\n  }\n\n  static normalizeScrollYOffset(value: RedocRawOptions['scrollYOffset']): () => number {\n    // just number is not valid selector and leads to crash so checking if isNumeric here\n    if (typeof value === 'string' && !isNumeric(value)) {\n      const el = querySelector(value);\n      if (!el) {\n        console.warn(\n          'scrollYOffset value is a selector to non-existing element. Using offset 0 by default',\n        );\n      }\n      const bottom = (el && el.getBoundingClientRect().bottom) || 0;\n      return () => bottom;\n    } else if (typeof value === 'number' || isNumeric(value)) {\n      return () => (typeof value === 'number' ? value : parseFloat(value));\n    } else if (typeof value === 'function') {\n      return () => {\n        const res = value();\n        if (typeof res !== 'number') {\n          console.warn(\n            `scrollYOffset should return number but returned value \"${res}\" of type ${typeof res}`,\n          );\n        }\n        return res;\n      };\n    } else if (value !== undefined) {\n      console.warn(\n        'Wrong value for scrollYOffset ReDoc option: should be string, number or function',\n      );\n    }\n\n    return () => 0;\n  }\n\n  static normalizeShowExtensions(value: RedocRawOptions['showExtensions']): string[] | boolean {\n    if (typeof value === 'undefined') {\n      return false;\n    }\n    if (value === '') {\n      return true;\n    }\n\n    if (typeof value !== 'string') {\n      return value;\n    }\n\n    switch (value) {\n      case 'true':\n        return true;\n      case 'false':\n        return false;\n      default:\n        return value.split(',').map(ext => ext.trim());\n    }\n  }\n\n  static normalizeSideNavStyle(value: RedocRawOptions['sideNavStyle']): SideNavStyleEnum {\n    const defaultValue = SideNavStyleEnum.SummaryOnly;\n    if (typeof value !== 'string') {\n      return defaultValue;\n    }\n\n    switch (value) {\n      case defaultValue:\n        return value;\n      case SideNavStyleEnum.PathOnly:\n        return SideNavStyleEnum.PathOnly;\n      case SideNavStyleEnum.IdOnly:\n        return SideNavStyleEnum.IdOnly;\n      default:\n        return defaultValue;\n    }\n  }\n\n  static normalizePayloadSampleIdx(value: RedocRawOptions['payloadSampleIdx']): number {\n    if (typeof value === 'number') {\n      return Math.max(0, value); // always greater or equal than 0\n    }\n\n    if (typeof value === 'string') {\n      return isFinite(value) ? parseInt(value, 10) : 0;\n    }\n\n    return 0;\n  }\n\n  private static normalizeJsonSampleExpandLevel(level?: number | string | 'all'): number {\n    if (level === 'all') {\n      return +Infinity;\n    }\n    if (!isNaN(Number(level))) {\n      return Math.ceil(Number(level));\n    }\n    return 2;\n  }\n\n  private static normalizeGeneratedPayloadSamplesMaxDepth(\n    value?: number | string | undefined,\n  ): number {\n    if (!isNaN(Number(value))) {\n      return Math.max(0, Number(value));\n    }\n\n    return 10;\n  }\n\n  theme: ResolvedThemeInterface;\n  scrollYOffset: () => number;\n  hideHostname: boolean;\n  expandResponses: { [code: string]: boolean } | 'all';\n  sortRequiredPropsFirst: boolean;\n  sortPropsAlphabetically: boolean;\n  sortEnumValuesAlphabetically: boolean;\n  sortOperationsAlphabetically: boolean;\n  sortTagsAlphabetically: boolean;\n  nativeScrollbars: boolean;\n  pathInMiddlePanel: boolean;\n  sanitize: boolean;\n  hideDownloadButtons: boolean;\n  downloadFileName?: string;\n  downloadDefinitionUrl?: string;\n  downloadUrls?: DownloadUrlsConfig;\n  disableSearch: boolean;\n  onlyRequiredInSamples: boolean;\n  showExtensions: boolean | string[];\n  sideNavStyle: SideNavStyleEnum;\n  hideSingleRequestSampleTab: boolean;\n  hideRequestPayloadSample: boolean;\n  menuToggle: boolean;\n  jsonSamplesExpandLevel: number;\n  enumSkipQuotes: boolean;\n  hideSchemaTitles: boolean;\n  simpleOneOfTypeLabel: boolean;\n  payloadSampleIdx: number;\n  expandSingleSchemaField: boolean;\n  schemasExpansionLevel: number;\n  schemaDefinitionsTagName?: string;\n  showObjectSchemaExamples: boolean;\n  showSecuritySchemeType?: boolean;\n  hideSecuritySection?: boolean;\n\n  /* tslint:disable-next-line */\n  unstable_ignoreMimeParameters: boolean;\n  allowedMdComponents: Record<string, MDXComponentMeta>;\n\n  expandDefaultServerVariables: boolean;\n  maxDisplayedEnumValues?: number;\n\n  ignoreNamedSchemas: Set<string>;\n  hideSchemaPattern: boolean;\n  generatedSamplesMaxDepth: number;\n  hideFab: boolean;\n  minCharacterLengthToInitSearch: number;\n  showWebhookVerb: boolean;\n  hidePropertiesPrefix?: boolean;\n\n  nonce?: string;\n\n  constructor(raw: RedocRawOptions, defaults: RedocRawOptions = {}) {\n    raw = { ...defaults, ...raw };\n    const hook = raw.theme && raw.theme.extensionsHook;\n\n    // migrate from old theme\n    if ((raw.theme as any)?.menu && !raw.theme?.sidebar) {\n      console.warn('Theme setting \"menu\" is deprecated. Rename to \"sidebar\"');\n      raw.theme!.sidebar = (raw.theme as any).menu;\n    }\n\n    if ((raw.theme as any)?.codeSample && !raw.theme?.codeBlock) {\n      console.warn('Theme setting \"codeSample\" is deprecated. Rename to \"codeBlock\"');\n      raw.theme!.codeBlock = (raw.theme as any).codeSample;\n    }\n\n    this.theme = resolveTheme(\n      mergeObjects({} as any, defaultTheme, { ...raw.theme, extensionsHook: undefined }),\n    );\n\n    this.theme.extensionsHook = hook as any;\n\n    // do not support dynamic labels changes. Labels should be configured before\n    setRedocLabels(raw.labels);\n\n    this.scrollYOffset = RedocNormalizedOptions.normalizeScrollYOffset(raw.scrollYOffset);\n    this.hideHostname = RedocNormalizedOptions.normalizeHideHostname(raw.hideHostname);\n    this.expandResponses = RedocNormalizedOptions.normalizeExpandResponses(raw.expandResponses);\n    this.sortRequiredPropsFirst = argValueToBoolean(\n      raw.sortRequiredPropsFirst || raw.requiredPropsFirst,\n    );\n    this.sortPropsAlphabetically = argValueToBoolean(raw.sortPropsAlphabetically);\n    this.sortEnumValuesAlphabetically = argValueToBoolean(raw.sortEnumValuesAlphabetically);\n    this.sortOperationsAlphabetically = argValueToBoolean(raw.sortOperationsAlphabetically);\n    this.sortTagsAlphabetically = argValueToBoolean(raw.sortTagsAlphabetically);\n    this.nativeScrollbars = argValueToBoolean(raw.nativeScrollbars);\n    this.pathInMiddlePanel = argValueToBoolean(raw.pathInMiddlePanel);\n    this.sanitize = argValueToBoolean(raw.sanitize || raw.untrustedSpec);\n    this.hideDownloadButtons = argValueToBoolean(raw.hideDownloadButtons || raw.hideDownloadButton);\n    this.downloadFileName = raw.downloadFileName;\n    this.downloadDefinitionUrl = raw.downloadDefinitionUrl;\n    this.downloadUrls = raw.downloadUrls;\n    this.disableSearch = argValueToBoolean(raw.disableSearch);\n    this.onlyRequiredInSamples = argValueToBoolean(raw.onlyRequiredInSamples);\n    this.showExtensions = RedocNormalizedOptions.normalizeShowExtensions(raw.showExtensions);\n    this.sideNavStyle = RedocNormalizedOptions.normalizeSideNavStyle(raw.sideNavStyle);\n    this.hideSingleRequestSampleTab = argValueToBoolean(raw.hideSingleRequestSampleTab);\n    this.hideRequestPayloadSample = argValueToBoolean(raw.hideRequestPayloadSample);\n    this.menuToggle = argValueToBoolean(raw.menuToggle, true);\n    this.jsonSamplesExpandLevel = RedocNormalizedOptions.normalizeJsonSampleExpandLevel(\n      raw.jsonSamplesExpandLevel || raw.jsonSampleExpandLevel,\n    );\n    this.enumSkipQuotes = argValueToBoolean(raw.enumSkipQuotes);\n    this.hideSchemaTitles = argValueToBoolean(raw.hideSchemaTitles);\n    this.simpleOneOfTypeLabel = argValueToBoolean(raw.simpleOneOfTypeLabel);\n    this.payloadSampleIdx = RedocNormalizedOptions.normalizePayloadSampleIdx(raw.payloadSampleIdx);\n    this.expandSingleSchemaField = argValueToBoolean(raw.expandSingleSchemaField);\n    this.schemasExpansionLevel = argValueToExpandLevel(\n      raw.schemasExpansionLevel || raw.schemaExpansionLevel,\n    );\n    this.schemaDefinitionsTagName = raw.schemaDefinitionsTagName;\n    this.showObjectSchemaExamples = argValueToBoolean(raw.showObjectSchemaExamples);\n    this.showSecuritySchemeType = argValueToBoolean(raw.showSecuritySchemeType);\n    this.hideSecuritySection = argValueToBoolean(raw.hideSecuritySection);\n\n    this.unstable_ignoreMimeParameters = argValueToBoolean(raw.unstable_ignoreMimeParameters);\n\n    this.allowedMdComponents = raw.allowedMdComponents || {};\n\n    this.expandDefaultServerVariables = argValueToBoolean(raw.expandDefaultServerVariables);\n    this.maxDisplayedEnumValues = argValueToNumber(raw.maxDisplayedEnumValues);\n    const ignoreNamedSchemas = isArray(raw.ignoreNamedSchemas)\n      ? raw.ignoreNamedSchemas\n      : raw.ignoreNamedSchemas?.split(',').map(s => s.trim());\n    this.ignoreNamedSchemas = new Set(ignoreNamedSchemas);\n    this.hideSchemaPattern = argValueToBoolean(raw.hideSchemaPattern);\n    this.generatedSamplesMaxDepth = RedocNormalizedOptions.normalizeGeneratedPayloadSamplesMaxDepth(\n      raw.generatedSamplesMaxDepth || raw.generatedPayloadSamplesMaxDepth,\n    );\n    this.nonce = raw.nonce;\n    this.hideFab = argValueToBoolean(raw.hideFab);\n    this.minCharacterLengthToInitSearch = argValueToNumber(raw.minCharacterLengthToInitSearch) || 3;\n    this.showWebhookVerb = argValueToBoolean(raw.showWebhookVerb);\n    this.hidePropertiesPrefix = argValueToBoolean(raw.hidePropertiesPrefix, true);\n  }\n}\n"
  },
  {
    "path": "src/services/ScrollService.ts",
    "content": "import { bind } from 'decko';\nimport { EventEmitter } from 'eventemitter3';\n\nimport { IS_BROWSER, querySelector, Throttle } from '../utils';\nimport type { RedocNormalizedOptions } from './RedocNormalizedOptions';\n\nconst EVENT = 'scroll';\n\nexport class ScrollService {\n  private _scrollParent: Window | HTMLElement | undefined;\n  private _emiter: EventEmitter;\n  private _prevOffsetY = 0;\n  constructor(private options: RedocNormalizedOptions) {\n    this._scrollParent = IS_BROWSER ? window : undefined;\n    this._emiter = new EventEmitter();\n    this.bind();\n  }\n\n  bind() {\n    this._prevOffsetY = this.scrollY();\n    if (this._scrollParent) {\n      this._scrollParent.addEventListener('scroll', this.handleScroll);\n    }\n  }\n\n  dispose() {\n    if (this._scrollParent) {\n      this._scrollParent.removeEventListener('scroll', this.handleScroll);\n    }\n    this._emiter.removeAllListeners(EVENT);\n  }\n\n  scrollY(): number {\n    if (typeof HTMLElement !== 'undefined' && this._scrollParent instanceof HTMLElement) {\n      return this._scrollParent.scrollTop;\n    } else if (this._scrollParent !== undefined) {\n      return (this._scrollParent as Window).pageYOffset;\n    } else {\n      return 0;\n    }\n  }\n\n  isElementBellow(el: Element | null) {\n    if (el === null) {\n      return;\n    }\n    return el.getBoundingClientRect().top > this.options.scrollYOffset();\n  }\n\n  isElementAbove(el: Element | null) {\n    if (el === null) {\n      return;\n    }\n    const top = el.getBoundingClientRect().top;\n    return (top > 0 ? Math.floor(top) : Math.ceil(top)) <= this.options.scrollYOffset();\n  }\n\n  subscribe(cb): () => void {\n    const emmiter = this._emiter.addListener(EVENT, cb);\n    return () => emmiter.removeListener(EVENT, cb);\n  }\n\n  scrollIntoView(element: Element | null) {\n    if (element === null) {\n      return;\n    }\n    element.scrollIntoView();\n    if (this._scrollParent && this._scrollParent.scrollBy) {\n      // adding 1 account rounding errors in case scrollYOffset is float-number\n      (this._scrollParent.scrollBy as any)(0, -this.options.scrollYOffset() + 1);\n    }\n  }\n\n  scrollIntoViewBySelector(selector: string) {\n    const element = querySelector(selector);\n    this.scrollIntoView(element);\n  }\n\n  @bind\n  @Throttle(100)\n  handleScroll() {\n    const scrollY = this.scrollY();\n    const isScrolledDown = scrollY - this._prevOffsetY > 0;\n    this._prevOffsetY = this.scrollY();\n    this._emiter.emit(EVENT, isScrolledDown);\n  }\n}\n"
  },
  {
    "path": "src/services/SearchStore.ts",
    "content": "import { IS_BROWSER } from '../utils/';\nimport type { IMenuItem } from './types';\nimport type { OperationModel } from './models';\n\nimport Worker from './SearchWorker.worker';\n\nfunction getWorker() {\n  let worker: new () => Worker;\n  if (IS_BROWSER) {\n    try {\n      // tslint:disable-next-line\n      worker = require('workerize-loader?inline&fallback=false!./SearchWorker.worker');\n    } catch (e) {\n      worker = require('./SearchWorker.worker').default;\n    }\n  } else {\n    worker = require('./SearchWorker.worker').default;\n  }\n  return new worker();\n}\n\nexport class SearchStore<T> {\n  searchWorker = getWorker();\n\n  indexItems(groups: Array<IMenuItem | OperationModel>) {\n    const recurse = items => {\n      items.forEach(group => {\n        if (group.type !== 'group') {\n          this.add(group.name, (group.description || '').concat(' ', group.path || ''), group.id);\n        }\n        recurse(group.items);\n      });\n    };\n\n    recurse(groups);\n    this.searchWorker.done();\n  }\n\n  add(title: string, body: string, meta?: T) {\n    this.searchWorker.add(title, body, meta);\n  }\n\n  dispose() {\n    (this.searchWorker as any).terminate();\n    (this.searchWorker as any).dispose();\n  }\n\n  search(q: string) {\n    return this.searchWorker.search<T>(q);\n  }\n\n  async toJS() {\n    return this.searchWorker.toJS();\n  }\n\n  load(state: any) {\n    this.searchWorker.load(state);\n  }\n\n  fromExternalJS(path?: string, exportName?: string) {\n    if (path && exportName) {\n      this.searchWorker.fromExternalJS(path, exportName);\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/SearchWorker.worker.ts",
    "content": "import * as lunr from 'lunr';\nimport type { SearchResult } from './types';\n\n/* just for better typings */\nexport default class Worker {\n  add: typeof add = add;\n  done = done;\n  search: typeof search = search;\n  toJS = toJS;\n  load = load;\n  dispose = dispose;\n  fromExternalJS = fromExternalJS;\n}\n\nlet store: any[] = [];\n\nlunr.tokenizer.separator = /\\s+/;\n\nlet builder: lunr.Builder;\n\nlet resolveIndex: (v: lunr.Index) => void;\n\nlet index: Promise<lunr.Index>;\n\nfunction initEmpty() {\n  builder = new lunr.Builder();\n  builder.field('title');\n  builder.field('description');\n  builder.ref('ref');\n\n  builder.pipeline.add(lunr.trimmer, lunr.stopWordFilter, lunr.stemmer);\n\n  index = new Promise(resolve => {\n    resolveIndex = resolve;\n  });\n}\n\ninitEmpty();\n\nconst expandTerm = term => {\n  const token = lunr.trimmer(new lunr.Token(term, {}));\n  return '*' + lunr.stemmer(token) + '*';\n};\n\nexport function add<T>(title: string, description: string, meta?: T) {\n  const ref = store.push(meta) - 1;\n  const item = { title: title.toLowerCase(), description: description.toLowerCase(), ref };\n  builder.add(item);\n}\n\nexport async function done() {\n  resolveIndex(builder.build());\n}\n\nexport async function toJS() {\n  return {\n    store,\n    index: (await index).toJSON(),\n  };\n}\n\nexport async function fromExternalJS(path: string, exportName: string) {\n  try {\n    importScripts(path);\n    if (!self[exportName]) {\n      throw new Error('Broken index file format');\n    }\n\n    load(self[exportName]);\n  } catch (e) {\n    console.error('Failed to load search index: ' + e.message);\n  }\n}\n\nexport async function load(state: any) {\n  store = state.store;\n  resolveIndex(lunr.Index.load(state.index));\n}\n\nexport async function dispose() {\n  store = [];\n  initEmpty();\n}\n\nexport async function search<Meta = string>(\n  q: string,\n  limit = 0,\n): Promise<Array<SearchResult<Meta>>> {\n  if (q.trim().length === 0) {\n    return [];\n  }\n\n  let searchResults = (await index).query(t => {\n    q.trim()\n      .toLowerCase()\n      .split(/\\s+/)\n      .forEach(term => {\n        if (term.length === 1) return;\n        const exp = expandTerm(term);\n        t.term(exp, {});\n      });\n  });\n\n  if (limit > 0) {\n    searchResults = searchResults.slice(0, limit);\n  }\n\n  return searchResults.map(res => ({ meta: store[res.ref], score: res.score }));\n}\n"
  },
  {
    "path": "src/services/SpecStore.ts",
    "content": "import type { OpenAPIExternalDocumentation, OpenAPIPath, OpenAPISpec, Referenced } from '../types';\n\nimport { MenuBuilder } from './MenuBuilder';\nimport { ApiInfoModel } from './models/ApiInfo';\nimport { WebhookModel } from './models/Webhook';\nimport { SecuritySchemesModel } from './models/SecuritySchemes';\nimport { OpenAPIParser } from './OpenAPIParser';\nimport type { RedocNormalizedOptions } from './RedocNormalizedOptions';\nimport type { ContentItemModel } from './types';\n/**\n * Store that contains all the specification related information in the form of tree\n */\nexport class SpecStore {\n  parser: OpenAPIParser;\n\n  info: ApiInfoModel;\n  externalDocs?: OpenAPIExternalDocumentation;\n  contentItems: ContentItemModel[];\n  securitySchemes: SecuritySchemesModel;\n  webhooks?: WebhookModel;\n\n  constructor(\n    spec: OpenAPISpec,\n    specUrl: string | undefined,\n    private options: RedocNormalizedOptions,\n  ) {\n    this.parser = new OpenAPIParser(spec, specUrl, options);\n    this.info = new ApiInfoModel(this.parser, this.options);\n    this.externalDocs = this.parser.spec.externalDocs;\n    this.contentItems = MenuBuilder.buildStructure(this.parser, this.options);\n    this.securitySchemes = new SecuritySchemesModel(this.parser);\n    const webhookPath: Referenced<OpenAPIPath> = {\n      ...this.parser?.spec?.['x-webhooks'],\n      ...this.parser?.spec.webhooks,\n    };\n    this.webhooks = new WebhookModel(this.parser, options, webhookPath);\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/MarkdownRenderer.test.ts",
    "content": "import type { MDXComponentMeta } from '../types';\nimport { MarkdownRenderer } from '../MarkdownRenderer';\nimport { RedocNormalizedOptions } from '../RedocNormalizedOptions';\n\nconst TestComponent = () => null;\n\ndescribe('Markdown renderer', () => {\n  let renderer: MarkdownRenderer;\n  beforeEach(() => {\n    renderer = new MarkdownRenderer(\n      new RedocNormalizedOptions({\n        allowedMdComponents: {\n          'security-definitions': {\n            component: TestComponent,\n            propsSelector: () => ({}),\n          },\n        },\n      }),\n    );\n  });\n\n  test('should return a level-1 heading even though only level-2 is present', () => {\n    renderer.renderMd('## Sub Intro', true);\n    expect(Object.keys(renderer.headings)).toHaveLength(1);\n    expect(renderer.headings[0].name).toEqual('Sub Intro');\n  });\n\n  test('should return a level-2 heading as a child of level-1', () => {\n    const headings = renderer.extractHeadings('# Introduction \\n ## Sub Intro');\n    expect(headings).toHaveLength(1);\n    expect(headings[0].name).toEqual('Introduction');\n    expect(headings[0].items).toBeDefined();\n    expect(headings[0].items).toHaveLength(1);\n  });\n\n  test('renderMdWithComponents should work with legacy syntax', () => {\n    const source = 'Hello!\\n<!-- ReDoc-Inject: <security-definitions> -->\\nBye';\n    const parts = renderer.renderMdWithComponents(source);\n    expect(parts).toHaveLength(3);\n    expect(parts[0]).toEqual('<p>Hello!</p>\\n');\n    expect(typeof parts[1]).toEqual('object');\n    expect((parts[1] as MDXComponentMeta).component).toEqual(TestComponent);\n    expect(parts[2]).toEqual('<p>Bye</p>\\n');\n  });\n\n  test('renderMdWithComponents should work with mdx-like syntax', () => {\n    const source = 'Hello!\\n<security-definitions/>\\nBye';\n    const parts = renderer.renderMdWithComponents(source);\n    expect(parts).toHaveLength(3);\n    expect(parts[0]).toEqual('<p>Hello!</p>\\n');\n    expect(typeof parts[1]).toEqual('object');\n    expect((parts[1] as MDXComponentMeta).component).toBe(TestComponent);\n    expect(parts[2]).toEqual('<p>Bye</p>\\n');\n  });\n\n  test('renderMdWithComponents should parse attribute names', () => {\n    const source = '<security-definitions pointer={\"test\"} />';\n    const parts = renderer.renderMdWithComponents(source);\n    expect(parts).toHaveLength(1);\n    const part = parts[0] as MDXComponentMeta;\n    expect(part.component).toBe(TestComponent);\n    expect(part.props).toEqual({ pointer: 'test' });\n  });\n\n  test('renderMdWithComponents should parse string attribute names', () => {\n    const source = '<security-definitions pointer=\"test\" />';\n    const parts = renderer.renderMdWithComponents(source);\n    expect(parts).toHaveLength(1);\n    const part = parts[0] as MDXComponentMeta;\n    expect(part.component).toBe(TestComponent);\n    expect(part.props).toEqual({ pointer: 'test' });\n  });\n\n  test('renderMdWithComponents should parse string attribute with spaces new-lines', () => {\n    const source = '<security-definitions \\n pointer = \"test\" \\n   flag-dash={ \\nfalse } />';\n    const parts = renderer.renderMdWithComponents(source);\n    expect(parts).toHaveLength(1);\n    const part = parts[0] as MDXComponentMeta;\n    expect(part.component).toBe(TestComponent);\n    expect(part.props).toEqual({ pointer: 'test', 'flag-dash': false });\n  });\n\n  test('renderMdWithComponents should parse children', () => {\n    const source = '<security-definitions> Test Test </security-definitions>';\n    const parts = renderer.renderMdWithComponents(source);\n    expect(parts).toHaveLength(1);\n    const part = parts[0] as MDXComponentMeta;\n    expect(part.component).toBe(TestComponent);\n    expect(part.props).toEqual({ children: ' Test Test ' });\n  });\n\n  test('renderMdWithComponents should parse children', () => {\n    const source = '<security-definitions> Test Test </security-definitions>';\n    const parts = renderer.renderMdWithComponents(source);\n    expect(parts).toHaveLength(1);\n    const part = parts[0] as MDXComponentMeta;\n    expect(part.component).toBe(TestComponent);\n    expect(part.props).toEqual({ children: ' Test Test ' });\n  });\n\n  test('should properly extract title from text', () => {\n    const rawTexts = ['text before\\n# Test', 'text before\\n  # Test', 'text before\\n# Test\\n'];\n    rawTexts.forEach(text => {\n      const headings = renderer.extractHeadings(text);\n      expect(headings).toHaveLength(1);\n      expect(headings[0].name).toEqual('Test');\n      expect(headings[0].description).toEqual('');\n    });\n\n    const rawTexts2 = ['# Test \\n text after', '# Test \\ntext after'];\n    rawTexts2.forEach(text => {\n      const headings = renderer.extractHeadings(text);\n      expect(headings).toHaveLength(1);\n      expect(headings[0].name).toEqual('Test');\n      expect(headings[0].description).toEqual('text after');\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/MarkerService.test.ts",
    "content": "const mockMark = jest.fn();\nconst mockUnmark = jest.fn();\n\njest.mock('mark.js', () => () => ({\n  mark: mockMark,\n  unmark: mockUnmark,\n}));\n\nimport { MarkerService } from '../MarkerService';\n\ndescribe('Marker service', () => {\n  let marker: MarkerService;\n  const element = document.createElement('span');\n\n  beforeEach(() => {\n    marker = new MarkerService();\n    mockMark.mockClear();\n    mockUnmark.mockClear();\n  });\n\n  test('add element to Map', () => {\n    marker.add(element);\n    expect(marker.map.size).toBeGreaterThan(0);\n  });\n\n  test('delete element from Map', () => {\n    marker.add(element);\n    marker.delete(element);\n\n    expect(marker.map.size).toEqual(0);\n  });\n\n  test('addOnly: should unmark and remove old elements', () => {\n    const e1 = document.createElement('span');\n    const e2 = document.createElement('span');\n    const e3 = document.createElement('span');\n\n    marker.add(e1);\n    marker.add(e2);\n\n    marker.addOnly([element, e2, e3]);\n\n    expect(mockUnmark).toHaveBeenCalledTimes(1);\n    expect(marker.map.size).toEqual(3);\n  });\n\n  test('unmark: should unmark all elements', () => {\n    const e1 = document.createElement('span');\n    const e2 = document.createElement('span');\n    marker.add(e1);\n    marker.add(e2);\n    marker.add(element);\n\n    marker.unmark();\n\n    expect(mockUnmark).toHaveBeenCalledTimes(3);\n    expect(mockMark).not.toHaveBeenCalled();\n  });\n  test('clearAll: should unmark and remove all elements', () => {\n    const e1 = document.createElement('span');\n    const e2 = document.createElement('span');\n    marker.add(e1);\n    marker.add(e2);\n    marker.add(element);\n\n    marker.clearAll();\n\n    expect(mockUnmark).toHaveBeenCalledTimes(3);\n    expect(mockMark).not.toHaveBeenCalled();\n    expect(marker.map.size).toEqual(0);\n  });\n\n  test('mark: should unmark and mark again each element', () => {\n    const e1 = document.createElement('span');\n    const e2 = document.createElement('span');\n    marker.add(e1);\n    marker.add(e2);\n    marker.add(element);\n\n    marker.mark('test');\n\n    expect(mockUnmark).toHaveBeenCalledTimes(3);\n    expect(mockMark).toHaveBeenCalledTimes(3);\n    expect(mockMark).toHaveBeenCalledWith('test');\n    expect(marker.map.size).toEqual(3);\n  });\n\n  test('mark: should do nothing if no term provided', () => {\n    marker.add(element);\n    marker.mark();\n\n    expect(mockMark).not.toHaveBeenCalled();\n  });\n  test('mark: should save previous marked term and use it if no term is provided', () => {\n    marker.add(element);\n    marker.mark('test');\n    marker.mark();\n\n    expect(mockMark).toHaveBeenLastCalledWith('test');\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/OpenAPIParser.test.ts",
    "content": "import { OpenAPIParser } from '../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../RedocNormalizedOptions';\nimport { OpenAPIParameter, Referenced } from '../../types';\n\nconst opts = new RedocNormalizedOptions({});\n\ndescribe('Models', () => {\n  describe('Schema', () => {\n    let parser;\n\n    test('should hoist oneOfs when mergin allOf', () => {\n      const spec = require('./fixtures/oneOfHoist.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      expect(parser.mergeAllOf(spec.components.schemas.test)).toMatchSnapshot();\n    });\n\n    test('should get schema name from named schema', () => {\n      const spec = require('./fixtures/mergeAllOf.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = parser.mergeAllOf(spec.components.schemas.Case1, '#/components/schemas/Case1');\n      expect(schema.title).toEqual('Case1');\n    });\n\n    test('should get schema name from first allOf', () => {\n      const spec = require('./fixtures/mergeAllOf.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = parser.mergeAllOf(\n        spec.components.schemas.Case2.properties.a,\n        '#components/schemas/Case2/properties/a',\n      );\n      expect(schema.title).toEqual('Bar');\n    });\n\n    test('should get schema name from named schema', () => {\n      const spec = require('./fixtures/mergeAllOf.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = parser.mergeAllOf(\n        spec.components.schemas.Case3.schemas.Foo,\n        '#components/schemas/Case3/schemas/Foo',\n      );\n      expect(schema.title).toEqual('Foo');\n    });\n\n    test('should merge oneOf to inside allOff', () => {\n      // TODO: should hoist\n      const spec = require('./fixtures/mergeAllOf.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = parser.mergeAllOf(spec.components.schemas.Case4);\n      expect(schema.title).toEqual('Foo');\n      expect(schema['x-parentRefs']).toHaveLength(1);\n      expect(schema['x-parentRefs'][0]).toEqual('#/components/schemas/Ref');\n      expect(schema.oneOf).toEqual([{ title: 'Bar' }, { title: 'Baz' }]);\n    });\n\n    test('should override description from $ref of the referenced component, when sibling description exists ', () => {\n      const spec = require('./fixtures/siblingRefDescription.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schemaOrRef: Referenced<OpenAPIParameter> = {\n        $ref: '#/components/schemas/Test',\n        description: 'Overriden description',\n      };\n\n      expect(parser.deref(schemaOrRef)).toMatchSnapshot();\n    });\n\n    test('should correct resolve double $ref if no need sibling', () => {\n      const spec = require('./fixtures/3.1/schemaDefinition.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schemaOrRef: Referenced<OpenAPIParameter> = {\n        $ref: '#/components/schemas/Parent',\n      };\n\n      expect(parser.deref(schemaOrRef, [], true)).toMatchSnapshot();\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/__snapshots__/OpenAPIParser.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Models Schema should correct resolve double $ref if no need sibling 1`] = `\n{\n  \"refsStack\": [\n    \"#/components/schemas/Parent\",\n  ],\n  \"resolved\": {\n    \"properties\": {\n      \"test\": {\n        \"type\": \"string\",\n      },\n    },\n    \"type\": \"object\",\n  },\n}\n`;\n\nexports[`Models Schema should hoist oneOfs when mergin allOf 1`] = `\n{\n  \"oneOf\": [\n    {\n      \"allOf\": [\n        {\n          \"properties\": {\n            \"id\": {\n              \"description\": \"The user's ID\",\n              \"type\": \"integer\",\n            },\n          },\n        },\n        {\n          \"properties\": {\n            \"username\": {\n              \"description\": \"The user's name\",\n              \"type\": \"string\",\n            },\n          },\n        },\n        {\n          \"properties\": {\n            \"extra\": {\n              \"type\": \"string\",\n            },\n          },\n        },\n        {\n          \"oneOf\": [\n            {\n              \"properties\": {\n                \"password\": {\n                  \"description\": \"The user's password\",\n                  \"type\": \"string\",\n                },\n              },\n            },\n            {\n              \"properties\": {\n                \"mobile\": {\n                  \"description\": \"The user's mobile\",\n                  \"type\": \"string\",\n                },\n              },\n            },\n          ],\n        },\n      ],\n      \"x-refsStack\": undefined,\n    },\n    {\n      \"allOf\": [\n        {\n          \"properties\": {\n            \"id\": {\n              \"description\": \"The user's ID\",\n              \"type\": \"integer\",\n            },\n          },\n        },\n        {\n          \"properties\": {\n            \"email\": {\n              \"description\": \"The user's email\",\n              \"type\": \"string\",\n            },\n          },\n        },\n        {\n          \"properties\": {\n            \"extra\": {\n              \"type\": \"string\",\n            },\n          },\n        },\n        {\n          \"oneOf\": [\n            {\n              \"properties\": {\n                \"password\": {\n                  \"description\": \"The user's password\",\n                  \"type\": \"string\",\n                },\n              },\n            },\n            {\n              \"properties\": {\n                \"mobile\": {\n                  \"description\": \"The user's mobile\",\n                  \"type\": \"string\",\n                },\n              },\n            },\n          ],\n        },\n      ],\n      \"x-refsStack\": undefined,\n    },\n    {\n      \"allOf\": [\n        {\n          \"properties\": {\n            \"id\": {\n              \"description\": \"The user's ID\",\n              \"type\": \"integer\",\n            },\n          },\n        },\n        {\n          \"properties\": {\n            \"id\": {\n              \"description\": \"The user's ID\",\n              \"format\": \"uuid\",\n              \"type\": \"string\",\n            },\n          },\n        },\n        {\n          \"properties\": {\n            \"extra\": {\n              \"type\": \"string\",\n            },\n          },\n        },\n        {\n          \"oneOf\": [\n            {\n              \"properties\": {\n                \"password\": {\n                  \"description\": \"The user's password\",\n                  \"type\": \"string\",\n                },\n              },\n            },\n            {\n              \"properties\": {\n                \"mobile\": {\n                  \"description\": \"The user's mobile\",\n                  \"type\": \"string\",\n                },\n              },\n            },\n          ],\n        },\n      ],\n      \"x-refsStack\": undefined,\n    },\n  ],\n}\n`;\n\nexports[`Models Schema should override description from $ref of the referenced component, when sibling description exists  1`] = `\n{\n  \"refsStack\": [\n    \"#/components/schemas/Test\",\n  ],\n  \"resolved\": {\n    \"description\": \"Overriden description\",\n    \"type\": \"object\",\n  },\n}\n`;\n"
  },
  {
    "path": "src/services/__tests__/__snapshots__/prism.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`prism.js helpers highlight js code 1`] = `\"<span class=\"token keyword\">const</span> t <span class=\"token operator\">=</span> <span class=\"token number\">10</span><span class=\"token punctuation\">;</span>\"`;\n"
  },
  {
    "path": "src/services/__tests__/fixtures/3.1/conditionalField.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Schema definition field with conditional operators\",\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Test\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"test\": {\n            \"type\": [\"string\", \"integer\", \"null\"],\n            \"minItems\": 1,\n            \"maxItems\": 20,\n            \"items\": {\n              \"type\": \"string\",\n              \"format\": \"url\"\n            },\n            \"if\": {\n              \"x-displayName\": \"isString\",\n              \"type\": \"string\"\n            },\n            \"then\": {\n              \"type\": \"string\",\n              \"minItems\": 1,\n              \"maxItems\": 20\n            },\n            \"else\": {\n              \"x-displayName\": \"notString\",\n              \"minItems\": 1,\n              \"maxItems\": 10,\n              \"pattern\": \"\\\\d+\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/3.1/conditionalSchema.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Schema definition with conditional operators\",\n    \"version\": \"1.0.0\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Test\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"test\": {\n            \"description\": \"The list of URL to a cute photos featuring pet\",\n            \"type\": [\"string\", \"integer\", \"null\"],\n            \"minItems\": 1,\n            \"maxItems\": 20,\n            \"items\": {\n              \"type\": \"string\",\n              \"format\": \"url\"\n            }\n          }\n        },\n        \"if\": {\n          \"title\": \"=== 10\",\n          \"properties\": {\n            \"test\": {\n              \"enum\": [10]\n            }\n          }\n        },\n        \"then\": {\n          \"maxItems\": 2\n        },\n        \"else\": {\n          \"maxItems\": 20\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/3.1/pathItems.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"version\": \"1.0.0\",\n    \"title\": \"Swagger Petstore\"\n  },\n  \"webhooks\": {\n    \"myWebhook\": {\n      \"$ref\": \"#/components/pathItems/catsWebhook\",\n      \"description\": \"Overriding description\",\n      \"summary\": \"Overriding summary\"\n    }\n  },\n  \"components\": {\n    \"pathItems\": {\n      \"catsWebhook\": {\n        \"put\": {\n          \"summary\": \"Get a cat details after update\",\n          \"description\": \"Get a cat details after update\",\n          \"operationId\": \"updatedCat\",\n          \"tags\": [\n            \"pet\"\n          ],\n          \"requestBody\": {\n            \"description\": \"Information about cat in the system\",\n            \"content\": {\n              \"multipart/form-data\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\"\n                }\n              }\n            }\n          },\n          \"responses\": {\n            \"200\": {\n              \"description\": \"update Cat details\"\n            }\n          }\n        },\n        \"post\": {\n          \"summary\": \"Create new cat\",\n          \"description\": \"Info about new cat\",\n          \"operationId\": \"createdCat\",\n          \"tags\": [\n            \"pet\"\n          ],\n          \"requestBody\": {\n            \"description\": \"Information about cat in the system\",\n            \"content\": {\n              \"multipart/form-data\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\"\n                }\n              }\n            }\n          },\n          \"responses\": {\n            \"200\": {\n              \"description\": \"create Cat details\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/3.1/patternProperties.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Schema definition with unevaluatedProperties\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"example.com\"\n    }\n  ],\n  \"components\": {\n    \"schemas\": {\n      \"Patterns\": {\n        \"type\": \"object\",\n        \"patternProperties\": {\n          \"^S_\\\\w+\\\\.[1-9]{2,4}$\": {\n            \"type\": \"string\"\n          },\n          \"^O_\\\\w+\\\\.[1-9]{2,4}$\": {\n            \"type\": \"object\",\n            \"properties\": {\n              \"x-nestedProperty\": {\n                \"type\": \"string\"\n              }\n            }\n          }\n        },\n        \"properties\": {\n          \"nestedObjectProp\": {\n            \"type\": \"object\",\n            \"patternProperties\": {\n              \".*\": {\n                \"type\": \"integer\"\n              }\n            }\n          },\n          \"nestedArrayProp\": {\n            \"type\": \"array\",\n            \"items\": {\n              \"patternProperties\": {\n                \".*\": {\n                  \"type\": \"string\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/3.1/prefixItems.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Schema definition with prefixItems\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"example.com\"\n    }\n  ],\n  \"components\": {\n    \"schemas\": {\n      \"Case1\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"prefixItems\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"items\": false\n      },\n      \"Case2\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"prefixItems\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"items\": true\n      },\n      \"Case3\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"prefixItems\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"items\": {\n          \"$ref\": \"#/components/schemas/Dog\"\n        }\n      },\n      \"Case4\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"prefixItems\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"items\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"firstItem\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Case5\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"prefixItems\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"items\": {\n          \"type\": \"array\",\n          \"items\": [\n            {\n              \"type\": \"string\",\n              \"minLength\": 0\n            }\n          ]\n        }\n      },\n      \"Case6\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"items\": {\n          \"$ref\": \"#/components/schemas/Tag\"\n        }\n      },\n      \"Case7\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"array_field\": {\n            \"$ref\": \"#/components/schemas/AnyArray\"\n          }\n        }\n      },\n      \"Cat\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"color\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Dog\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"size\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Tag\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"Tag ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"tag name\",\n            \"type\": \"string\",\n            \"minLength\": 1\n          }\n        }\n      },\n      \"Id\": {\n        \"type\": \"integer\",\n        \"format\": \"int64\",\n        \"readOnly\": true\n      },\n      \"AnyArray\": {\n        \"type\": \"array\",\n        \"items\": true\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/3.1/schemaDefinition.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Schema definition double $ref\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"example.com\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"name\": \"test\",\n      \"x-displayName\": \"The test Model\",\n      \"description\": \"<SchemaDefinition schemaRef=\\\"#/components/schemas/Parent\\\" />\\n\"\n    }\n  ],\n  \"paths\": {\n    \"/newPath\": {\n      \"post\": {\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Child\"\n              }\n            }\n          }\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"all ok\"\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Parent\": {\n        \"$ref\": \"#/components/schemas/Child\"\n      },\n      \"Child\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"test\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/3.1/unevaluatedProperties.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"Schema definition with unevaluatedProperties\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"example.com\"\n    }\n  ],\n  \"components\": {\n    \"schemas\": {\n      \"Test\": {\n        \"type\": \"object\",\n        \"unevaluatedProperties\": true,\n        \"properties\": {\n          \"$ref\": \"#/components/schemas/Cat\"\n        }\n      },\n      \"Test2\": {\n        \"type\": \"object\",\n        \"unevaluatedProperties\": true,\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/Dog\"\n          }\n        ]\n      },\n      \"Test3\": {\n        \"type\": \"object\",\n        \"unevaluatedProperties\": {\n          \"type\": \"boolean\"\n        },\n        \"properties\": {\n          \"$ref\": \"#/components/schemas/Cat\"\n        }\n      },\n      \"Cat\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"color\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Dog\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"size\": {\n            \"type\": \"string\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/arrayItems.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"title\": \"Schema definition with array items\",\n    \"version\": \"1.0.0\"\n  },\n  \"servers\": [\n    {\n      \"url\": \"example.com\"\n    }\n  ],\n  \"components\": {\n    \"schemas\": {\n      \"Case1\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"items\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"additionalItems\": false\n      },\n      \"Case2\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"items\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"additionalItems\": true\n      },\n      \"Case3\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"items\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"additionalItems\": {\n          \"$ref\": \"#/components/schemas/Dog\"\n        }\n      },\n      \"Case4\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"items\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"additionalItems\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"firstItem\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Case5\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"maxItems\": 10,\n        \"items\": [\n          {\n            \"type\": \"string\",\n            \"minLength\": 0,\n            \"maxLength\": 10\n          },\n          {\n            \"type\": \"number\",\n            \"minimum\": 0,\n            \"maximum\": 10\n          },\n          {\n            \"$ref\": \"#/components/schemas/Cat\"\n          }\n        ],\n        \"additionalItems\": {\n          \"type\": \"array\",\n          \"items\": [\n            {\n              \"type\": \"string\",\n              \"minLength\": 0\n            }\n          ]\n        }\n      },\n      \"Case6\": {\n        \"type\": \"array\",\n        \"minItems\": 1,\n        \"items\": {\n          \"$ref\": \"#/components/schemas/Tag\"\n        }\n      },\n      \"Case7\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"array_field\": {\n            \"$ref\": \"#/components/schemas/AnyArray\"\n          }\n        }\n      },\n      \"Cat\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"color\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Dog\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"size\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Tag\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"description\": \"Tag ID\",\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\"\n              }\n            ]\n          },\n          \"name\": {\n            \"description\": \"tag name\",\n            \"type\": \"string\",\n            \"minLength\": 1\n          }\n        }\n      },\n      \"Id\": {\n        \"type\": \"integer\",\n        \"format\": \"int64\",\n        \"readOnly\": true\n      },\n      \"AnyArray\": {\n        \"type\": \"array\",\n        \"items\": true\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/callback.json",
    "content": "{\n    \"openapi\": \"3.0.0\",\n    \"info\": {\n      \"version\": \"1.0\",\n      \"title\": \"Foo\"\n    },\n    \"components\": {\n      \"callbacks\": {\n        \"Test\": {\n            \"post\": {\n              \"operationId\": \"testCallback\",\n              \"description\": \"Test callback.\",\n              \"requestBody\": {\n                \"content\": {\n                  \"application/json\": {\n                    \"schema\": {\n                      \"title\": \"TestTitle\",\n                      \"type\": \"object\",\n                      \"description\": \"Test description\",\n                      \"properties\": {\n                        \"type\": {\n                          \"type\": \"string\",\n                          \"description\": \"The type of response.\",\n                          \"enum\": [\n                            \"TestResponse.Complete\"\n                          ]\n                        },\n                        \"status\": {\n                          \"type\": \"string\",\n                          \"enum\": [\n                            \"FAILURE\",\n                            \"SUCCESS\"\n                          ]\n                        }\n                      },\n                      \"required\": [\n                        \"status\"\n                      ]\n                    }\n                  }\n                }\n              },\n              \"parameters\": [\n                {\n                  \"name\": \"X-Test-Header\",\n                  \"in\": \"header\",\n                  \"required\": true,\n                  \"example\": \"1\",\n                  \"description\": \"This is a test header parameter\",\n                  \"schema\": {\n                    \"type\": \"string\"\n                  }\n                }\n              ],\n              \"responses\": {\n                \"204\": {\n                  \"description\": \"Test response.\"\n                }\n              }\n            }\n          }\n      }\n    }\n  }"
  },
  {
    "path": "src/services/__tests__/fixtures/discriminator.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"servers\": [],\n  \"info\": {\n    \"title\": \"Broken Redoc Discriminator\",\n    \"version\": \"\"\n  },\n  \"paths\": {\n    \"/foo\": {\n      \"get\": {\n        \"responses\": {\n          \"200\": {\n            \"description\": \"OK\",\n            \"content\": {\n              \"*/*\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/FooTopLevel\"\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"JsonApiResource\": {\n        \"type\": \"object\",\n        \"description\": \"A related resource.\",\n        \"required\": [\n          \"type\"\n        ],\n        \"discriminator\": {\n          \"propertyName\": \"type\"\n        },\n        \"properties\": {\n          \"type\": {\n            \"type\": \"string\",\n            \"description\": \"The type of object this resource represents.\"\n          }\n        }\n      },\n      \"FooTopLevel\": {\n        \"type\": \"object\",\n        \"required\": [\n          \"data\"\n        ],\n        \"properties\": {\n          \"data\": {\n            \"$ref\": \"#/components/schemas/Foo\"\n          }\n        }\n      },\n      \"Foo\": {\n        \"allOf\": [\n          {\n            \"type\": \"object\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/JsonApiResource\"\n          }\n        ]\n      }\n    }\n  }\n}"
  },
  {
    "path": "src/services/__tests__/fixtures/fields.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"version\": \"1.0\",\n    \"title\": \"Foo\"\n  },\n  \"components\": {\n    \"parameters\": {\n      \"testParam\": {\n        \"in\": \"path\",\n        \"name\": \"test_name\",\n        \"schema\": { \"type\": \"string\" }\n      },\n      \"serializationParam\": {\n        \"in\": \"query\",\n        \"name\": \"serialization_test_name\",\n        \"schema\": { \"type\": \"array\" },\n        \"style\": \"form\",\n        \"explode\": true\n      },\n      \"queryParamWithNoStyle\": {\n        \"in\": \"query\",\n        \"name\": \"serialization_test_name\",\n        \"schema\": { \"type\": \"array\" }\n      },\n      \"pathParamWithNoStyle\": {\n        \"in\": \"path\",\n        \"name\": \"serialization_test_name\",\n        \"schema\": { \"type\": \"array\" }\n      },\n      \"cookieParamWithNoStyle\": {\n        \"in\": \"cookie\",\n        \"name\": \"serialization_test_name\",\n        \"schema\": { \"type\": \"array\" }\n      }\n    },\n    \"headers\": {\n      \"testHeader\": {\n        \"description\": \"The response content language\",\n        \"schema\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/mergeAllOf.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"version\": \"1.0\",\n    \"title\": \"Foo\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Case1\": {\n        \"allOf\": [\n          {\n            \"title\": \"Bar\"\n          },\n          {\n            \"title\": \"Baz\"\n          }\n        ]\n      },\n      \"Case2\": {\n        \"properties\": {\n          \"a\": {\n            \"allOf\": [\n              {\n                \"title\": \"Bar\"\n              },\n              {\n                \"title\": \"Baz\"\n              }\n            ]\n          }\n        }\n      },\n      \"Case3\": {\n        \"schemas\": {\n          \"Foo\": {\n            \"title\": \"Foo\",\n            \"allOf\": [\n              {\n                \"title\": \"Bar\"\n              },\n              {\n                \"title\": \"Baz\"\n              }\n            ]\n          }\n        }\n      },\n      \"Case4\": {\n        \"allOf\": [\n          {\n            \"title\": \"Foo\"\n          },\n          {\n            \"$ref\": \"#/components/schemas/Ref\"\n          }\n        ]\n      },\n      \"Ref\": {\n        \"oneOf\": [\n          {\n            \"title\": \"Bar\"\n          },\n          {\n            \"title\": \"Baz\"\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/nestedEnumDescroptionSample.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"version\": \"1.0\",\n    \"title\": \"Test\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Test\": {\n        \"type\": \"array\",\n        \"description\": \"test description\",\n        \"items\": {\n          \"type\": \"string\",\n          \"description\": \"test description\",\n          \"enum\": [\"authorize\", \"do-nothing\"],\n          \"x-enumDescriptions\": {\n            \"authorize-and-void\": \"Will create an authorize transaction in the amount/currency of the request, followed by a void\",\n            \"do-nothing\": \"Will do nothing, and return an approved `setup` transaction. This is the default behavior.\"\n          }\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/oneOfHoist.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"version\": \"1.0\",\n    \"title\": \"Foo\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"test\": {\n        \"allOf\": [\n          {\n            \"properties\": {\n              \"id\": {\n                \"description\": \"The user's ID\",\n                \"type\": \"integer\"\n              }\n            },\n            \"oneOf\": [\n              {\n                \"properties\": {\n                  \"username\": {\n                    \"description\": \"The user's name\",\n                    \"type\": \"string\"\n                  }\n                }\n              },\n              {\n                \"properties\": {\n                  \"email\": {\n                    \"description\": \"The user's email\",\n                    \"type\": \"string\"\n                  }\n                }\n              },\n              {\n                \"properties\": {\n                  \"id\": {\n                    \"description\": \"The user's ID\",\n                    \"type\": \"string\",\n                    \"format\": \"uuid\"\n                  }\n                }\n              }\n            ]\n          },\n          {\n            \"properties\": {\n              \"extra\": {\n                \"type\": \"string\"\n              }\n            }\n          },\n          {\n            \"oneOf\": [\n              {\n                \"properties\": {\n                  \"password\": {\n                    \"description\": \"The user's password\",\n                    \"type\": \"string\"\n                  }\n                }\n              },\n              {\n                \"properties\": {\n                  \"mobile\": {\n                    \"description\": \"The user's mobile\",\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            ]\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/fixtures/oneOfTitles.json",
    "content": "{\n  \"openapi\": \"3.0.0\",\n  \"info\": {\n    \"version\": \"1.0\",\n    \"title\": \"Foo\"\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Test\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"any\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Foo\"\n              },\n              {\n                \"$ref\": \"#/components/schemas/Bar\"\n              }\n            ]\n          },\n          \"one\": {\n            \"oneOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Foo\"\n              },\n              {\n                \"$ref\": \"#/components/schemas/Bar\"\n              }\n            ]\n          },\n          \"all\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Foo\"\n              },\n              {\n                \"$ref\": \"#/components/schemas/Bar\"\n              }\n            ]\n          }\n        }\n      },\n      \"Foo\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"foo\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"Bar\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"bar\": {\n            \"type\": \"string\"\n          }\n        }\n      },\n      \"WithArray\": {\n        \"oneOf\": [{\n          \"type\" : \"array\",\n          \"items\": {\n            \"oneOf\": [\n              {\n                \"type\": \"string\"\n              },\n              {\n                \"type\": \"number\"\n              }\n            ]\n          }\n        }, {\n          \"type\": \"string\"\n        }]\n      }\n    }\n  }\n}"
  },
  {
    "path": "src/services/__tests__/fixtures/siblingRefDescription.json",
    "content": "{\n  \"openapi\": \"3.1.0\",\n  \"info\": {\n    \"title\": \"AA\",\n    \"version\": \"1.0\"\n  },\n  \"paths\": {\n    \"/test\": {\n      \"get\": {\n        \"operationId\": \"test\",\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"type\": \"object\",\n                  \"properties\": {\n                    \"testAttr\": {\n                      \"description\": \"Overriden description\",\n                      \"$ref\": \"#/components/schemas/Test\"\n                    }\n                  }\n                }\n              }\n            }\n          }\n        }\n      }\n    }\n  },\n  \"components\": {\n    \"schemas\": {\n      \"Test\": {\n        \"type\": \"object\",\n        \"description\": \"Refed description\"\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/__tests__/history.service.test.ts",
    "content": "import { history } from '../HistoryService';\n\ndescribe('History service', () => {\n  test('should be an instance', () => {\n    expect(typeof history).not.toBe('function');\n    expect(history.subscribe).toBeDefined();\n  });\n\n  test('History subscribe', () => {\n    const fn = jest.fn();\n    history.subscribe(fn);\n    history.emit();\n    expect(fn).toHaveBeenCalled();\n  });\n\n  test('History subscribe should return unsubscribe function', () => {\n    const fn = jest.fn();\n    const unsubscribe = history.subscribe(fn);\n    history.emit();\n    expect(fn).toHaveBeenCalled();\n    unsubscribe();\n    history.emit();\n    expect(fn).toHaveBeenCalledTimes(1);\n  });\n\n  test('currentId should return correct id', () => {\n    window.location.hash = '#testid';\n    expect(history.currentId).toEqual('testid');\n  });\n\n  test('should return correct link for id', () => {\n    expect(history.linkForId('testid')).toEqual('#testid');\n  });\n\n  test('should return empty link for empty id', () => {\n    expect(history.linkForId('')).toEqual('');\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/ApiInfo.test.ts",
    "content": "import { ApiInfoModel } from '../../models/ApiInfo';\nimport { OpenAPIParser } from '../../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../../RedocNormalizedOptions';\n\nconst opts = new RedocNormalizedOptions({});\ndescribe('Models', () => {\n  describe('ResponseModel', () => {\n    let parser: OpenAPIParser;\n\n    beforeEach(() => {\n      parser = new OpenAPIParser({ openapi: '3.0.0' } as any, undefined, opts);\n    });\n\n    test('should correctly populate description field without md headings', () => {\n      parser.spec = {\n        openapi: '3.0.0',\n        info: {\n          description: 'Test description',\n        },\n      } as any;\n\n      const info = new ApiInfoModel(parser);\n      expect(info.description).toEqual('Test description');\n    });\n\n    test('should correctly populate description up to the first md heading', () => {\n      parser.spec = {\n        openapi: '3.0.0',\n        info: {\n          description: 'Test description\\nsome text\\n## Heading\\n test',\n        },\n      } as any;\n\n      const info = new ApiInfoModel(parser);\n      expect(info.description).toEqual('Test description\\nsome text\\n');\n    });\n\n    test('should correctly populate summary up to the first md heading', () => {\n      parser.spec = {\n        openapi: '3.1.0',\n        info: {\n          summary: 'Test summary\\nsome text\\n## Heading\\n test',\n        },\n      } as any;\n\n      const info = new ApiInfoModel(parser);\n      expect(info.summary).toEqual('Test summary\\nsome text\\n## Heading\\n test');\n    });\n\n    test('should correctly populate description when 2nd line is started by white space', () => {\n      parser.spec = {\n        openapi: '3.0.0',\n        info: {\n          description: 'text before\\n  # Test',\n        },\n      } as any;\n\n      const info = new ApiInfoModel(parser);\n      expect(info.description).toEqual('text before\\n');\n    });\n\n    test('should correctly populate description when 2nd line is only white space', () => {\n      parser.spec = {\n        openapi: '3.0.0',\n        info: {\n          description: 'text before\\n \\n # Test',\n        },\n      } as any;\n\n      const info = new ApiInfoModel(parser);\n      expect(info.description).toEqual('text before\\n');\n    });\n\n    test('should correctly populate license identifier', () => {\n      parser.spec = {\n        openapi: '3.1.0',\n        info: {\n          license: {\n            name: 'MIT',\n            identifier: 'MIT',\n            url: 'https://opensource.org/licenses/MIT',\n          },\n        },\n      } as any;\n\n      const { license = { identifier: null } } = new ApiInfoModel(parser);\n      expect(license.identifier).toEqual('MIT');\n    });\n\n    test('should correctly populate default download file name', () => {\n      parser.spec = {\n        openapi: '3.0.0',\n        info: {\n          description: 'Test description',\n        },\n      } as any;\n\n      const info = new ApiInfoModel(parser);\n      expect(info.downloadFileName).toEqual('openapi.json');\n    });\n\n    test('should correctly populate default download file is undefined when using specUrl', () => {\n      parser = new OpenAPIParser(\n        {\n          openapi: '3.0.0',\n          info: {\n            description: 'Test description',\n          },\n        } as any,\n        '/demo/openapi.yaml',\n        opts,\n      );\n\n      const info = new ApiInfoModel(parser);\n      expect(info.downloadFileName).toEqual(undefined);\n    });\n\n    test('should correctly populate download file name', () => {\n      parser.spec = {\n        info: {\n          description: 'Test description',\n        },\n      } as any;\n\n      const opts = new RedocNormalizedOptions({\n        downloadFileName: 'test.yaml',\n      });\n\n      const info = new ApiInfoModel(parser, opts);\n      expect(info.downloadFileName).toEqual('test.yaml');\n    });\n\n    test('should correctly populate download link', () => {\n      parser.spec = {\n        openapi: '3.0.0',\n        info: {\n          description: 'Test description',\n        },\n      } as any;\n\n      const opts = new RedocNormalizedOptions({\n        downloadUrls: [{ title: 'Openapi description', url: 'https:test.com/filename.yaml' }],\n      });\n      const info = new ApiInfoModel(parser, opts);\n      expect(info.downloadUrls).toMatchInlineSnapshot(`\n        [\n          {\n            \"title\": \"Openapi description\",\n            \"url\": \"https:test.com/filename.yaml\",\n          },\n        ]\n      `);\n      expect(info.downloadFileName).toMatchInlineSnapshot(`\"openapi.json\"`);\n    });\n\n    test('should correctly populate download link and download file name', () => {\n      parser.spec = {\n        openapi: '3.0.0',\n        info: {\n          description: 'Test description',\n        },\n      } as any;\n\n      const opts = new RedocNormalizedOptions({\n        downloadDefinitionUrl: 'https:test.com/filename.yaml',\n        downloadFileName: 'test.yaml',\n      });\n      const info = new ApiInfoModel(parser, opts);\n      expect(info.downloadUrls).toMatchInlineSnapshot(`\n        [\n          {\n            \"title\": \"Download\",\n            \"url\": \"https:test.com/filename.yaml\",\n          },\n        ]\n      `);\n      expect(info.downloadFileName).toMatchInlineSnapshot(`\"test.yaml\"`);\n\n      const opts2 = new RedocNormalizedOptions({\n        downloadUrls: [{ title: 'Download file', url: 'https:test.com/filename.yaml' }],\n      });\n      const info2 = new ApiInfoModel(parser, opts2);\n      expect(info2.downloadUrls).toMatchInlineSnapshot(`\n        [\n          {\n            \"title\": \"Download file\",\n            \"url\": \"https:test.com/filename.yaml\",\n          },\n        ]\n      `);\n      expect(info2.downloadFileName).toMatchInlineSnapshot(`\"openapi.json\"`);\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/Callback.test.ts",
    "content": "import { CallbackModel } from '../../models/Callback';\nimport { OpenAPIParser } from '../../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../../RedocNormalizedOptions';\n\nconst opts = new RedocNormalizedOptions({});\n\ndescribe('Models', () => {\n  describe('CallbackModel', () => {\n    // eslint-disable-next-line @typescript-eslint/no-var-requires\n    const spec = require('../fixtures/callback.json');\n    const parser = new OpenAPIParser(spec, undefined, opts);\n\n    test('basic callback details', () => {\n      const callback = new CallbackModel(\n        parser,\n        'Test.Callback',\n        { $ref: '#/components/callbacks/Test' },\n        '',\n        opts,\n      );\n      expect(callback.name).toEqual('Test.Callback');\n      expect(callback.operations.length).toEqual(0);\n      expect(callback.expanded).toBeFalsy();\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/FieldModel.test.ts",
    "content": "import { FieldModel } from '../../models/Field';\nimport { OpenAPIParser } from '../../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../../RedocNormalizedOptions';\n\nconst opts = new RedocNormalizedOptions({});\n\ndescribe('Models', () => {\n  describe('FieldModel', () => {\n    // eslint-disable-next-line @typescript-eslint/no-var-requires\n    const spec = require('../fixtures/fields.json');\n    const parser = new OpenAPIParser(spec, undefined, opts);\n\n    test('basic field details', () => {\n      const field = new FieldModel(\n        parser,\n        {\n          $ref: '#/components/parameters/testParam',\n        },\n        '#/components/parameters/testParam',\n        opts,\n      );\n\n      expect(field.name).toEqual('test_name');\n      expect(field.in).toEqual('path');\n      expect(field.required).toEqual(false);\n      expect(field.schema.type).toEqual('string');\n    });\n\n    test('field details relevant for parameter serialization', () => {\n      const field = new FieldModel(\n        parser,\n        {\n          $ref: '#/components/parameters/serializationParam',\n        },\n        '#/components/parameters/serializationParam',\n        opts,\n      );\n\n      expect(field.name).toEqual('serialization_test_name');\n      expect(field.in).toEqual('query');\n      expect(field.schema.type).toEqual('array');\n      expect(field.style).toEqual('form');\n      expect(field.explode).toEqual(true);\n    });\n\n    test('field details relevant for default path param serialization', () => {\n      const field = new FieldModel(\n        parser,\n        {\n          $ref: '#/components/parameters/pathParamWithNoStyle',\n        },\n        '#/components/parameters/pathParamWithNoStyle',\n        opts,\n      );\n\n      expect(field.name).toEqual('serialization_test_name');\n      expect(field.in).toEqual('path');\n      expect(field.schema.type).toEqual('array');\n      expect(field.style).toEqual('simple');\n      expect(field.explode).toEqual(false);\n    });\n\n    test('field details relevant for default query parameter serialization', () => {\n      const field = new FieldModel(\n        parser,\n        {\n          $ref: '#/components/parameters/queryParamWithNoStyle',\n        },\n        '#/components/parameters/queryParamWithNoStyle',\n        opts,\n      );\n\n      expect(field.name).toEqual('serialization_test_name');\n      expect(field.in).toEqual('query');\n      expect(field.schema.type).toEqual('array');\n      expect(field.style).toEqual('form');\n      expect(field.explode).toEqual(true);\n    });\n\n    test('field details relevant for default cookie parameter serialization', () => {\n      const field = new FieldModel(\n        parser,\n        {\n          $ref: '#/components/parameters/queryParamWithNoStyle',\n        },\n        '#/components/parameters/queryParamWithNoStyle',\n        opts,\n      );\n\n      expect(field.name).toEqual('serialization_test_name');\n      expect(field.in).toEqual('query');\n      expect(field.schema.type).toEqual('array');\n      expect(field.style).toEqual('form');\n      expect(field.explode).toEqual(true);\n    });\n\n    test('field name should populated from name even if $ref (headers)', () => {\n      const field = new FieldModel(\n        parser,\n        {\n          $ref: '#/components/headers/testHeader',\n          name: 'Test-Header',\n        },\n        '#/components/headers/testHeader',\n        opts,\n      );\n\n      expect(field.name).toEqual('Test-Header');\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/MenuBuilder.test.ts",
    "content": "/* eslint-disable @typescript-eslint/no-var-requires */\nimport { MenuBuilder } from '../../MenuBuilder';\nimport { OpenAPIParser } from '../../OpenAPIParser';\n\nimport { RedocNormalizedOptions } from '../../RedocNormalizedOptions';\n\nconst opts = new RedocNormalizedOptions({});\n\ndescribe('Models', () => {\n  describe('MenuBuilder', () => {\n    let parser;\n\n    test('should resolve pathItems', () => {\n      const spec = require('../fixtures/3.1/pathItems.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const contentItems = MenuBuilder.buildStructure(parser, opts);\n      expect(contentItems).toHaveLength(1);\n      expect(contentItems[0].items).toHaveLength(2);\n      expect(contentItems[0].id).toEqual('tag/pet');\n      expect(contentItems[0].name).toEqual('pet');\n      expect(contentItems[0].type).toEqual('tag');\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/RequestBody.test.ts",
    "content": "import { parseYaml } from '@redocly/openapi-core';\nimport { outdent } from 'outdent';\nimport { RequestBodyModel } from '../../models/RequestBody';\nimport { OpenAPIParser } from '../../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../../RedocNormalizedOptions';\n\nconst opts = new RedocNormalizedOptions({});\ndescribe('Models', () => {\n  describe('RequestBodyModel', () => {\n    let parser, props;\n\n    beforeEach(() => {\n      parser = new OpenAPIParser({ openapi: '3.0.0' } as any, undefined, opts);\n      props = {\n        parser,\n        infoOrRef: {},\n        options: opts,\n        isEvent: false,\n      };\n    });\n\n    test('should work with default props', () => {\n      const consoleError = jest.spyOn(global.console, 'error');\n      const req = new RequestBodyModel(props);\n      expect(consoleError).not.toHaveBeenCalled();\n      expect(req).toEqual({ description: '', required: undefined });\n    });\n\n    test('should work with set required', () => {\n      const consoleError = jest.spyOn(global.console, 'error');\n      props.infoOrRef.required = false;\n      const req = new RequestBodyModel(props);\n      expect(consoleError).not.toHaveBeenCalled();\n      expect(req).toEqual({ description: '', required: false });\n    });\n\n    test('should have correct field data when it includes allOf', () => {\n      const spec = parseYaml(outdent`\n          openapi: 3.0.0\n          paths:\n            /user:\n              post:\n                tags:\n                  - user\n                summary: Create user\n                description: This can only be done by the logged in user.\n                operationId: createUser\n                requestBody:\n                  content:\n                    application/json:\n                      schema:\n                        $ref: '#/components/schemas/User'\n                  description: Created user object\n                  required: true\n          components:\n            schemas:\n              User:\n                allOf:\n                  - type: object\n                    properties:\n                      name:\n                        type: string\n                        description: correct description name\n                        readOnly: false\n                        writeOnly: false\n                        allOf:\n                          - $ref: '#/components/schemas/NameField'\n              NameField:\n                description: name description\n                readOnly: true\n                writeOnly: true\n          `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const req = new RequestBodyModel({\n        parser,\n        infoOrRef: spec.paths['/user'].post.requestBody,\n        options: opts,\n        isEvent: false,\n      });\n      const nameField = req.content?.mediaTypes[0].schema?.fields?.[0];\n      expect(nameField?.schema.readOnly).toBe(false);\n      expect(nameField?.schema.writeOnly).toBe(false);\n      expect(nameField?.description).toMatchInlineSnapshot(`\"correct description name\"`);\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/Response.test.ts",
    "content": "import { parseYaml } from '@redocly/openapi-core';\nimport { outdent } from 'outdent';\n\nimport { ResponseModel } from '../../models/Response';\nimport { OpenAPIParser } from '../../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../../RedocNormalizedOptions';\n\nconst opts = new RedocNormalizedOptions({});\ndescribe('Models', () => {\n  describe('ResponseModel', () => {\n    let parser, props;\n\n    beforeEach(() => {\n      parser = new OpenAPIParser({ openapi: '3.0.0' } as any, undefined, opts);\n      props = {\n        parser,\n        defaultAsError: false,\n        infoOrRef: {},\n        options: opts,\n        isEvent: false,\n        code: 'default',\n      };\n    });\n\n    test('should calculate response type based on code', () => {\n      let resp = new ResponseModel({ ...props, code: '200' });\n      expect(resp.type).toEqual('success');\n      resp = new ResponseModel({ ...props, code: '120' });\n      expect(resp.type).toEqual('info');\n      resp = new ResponseModel({ ...props, code: '301' });\n      expect(resp.type).toEqual('redirect');\n      resp = new ResponseModel({ ...props, code: '400' });\n      expect(resp.type).toEqual('error');\n    });\n\n    test('default should be successful by default', () => {\n      const resp = new ResponseModel({ ...props, code: 'default' });\n      expect(resp.type).toEqual('success');\n    });\n\n    test('default should be error if defaultAsError is true', () => {\n      const resp = new ResponseModel({ ...props, code: 'default', defaultAsError: true });\n      expect(resp.type).toEqual('error');\n    });\n\n    test('ensure extensions are shown if showExtensions is true', () => {\n      const options = new RedocNormalizedOptions({ showExtensions: true });\n      const resp = new ResponseModel({\n        parser,\n        code: 'default',\n        defaultAsError: true,\n        infoOrRef: { 'x-example': { a: 1 } },\n        options,\n        isEvent: true,\n      });\n      expect(Object.keys(resp.extensions).length).toEqual(1);\n      expect(resp.extensions['x-example']).toEqual({ a: 1 });\n    });\n\n    test('should get correct sibling in responses for openapi 3.1', () => {\n      const spec = parseYaml(outdent`\n        openapi: 3.1.0\n        paths:\n          /test:\n            get:\n              operationId: test\n              responses:\n                '200':\n                  description: Overridden description\n                  $ref: \"#/components/responses/Successful\"\n        components:\n          responses:\n            Successful:\n              description: successful operation\n              content:\n                application/json:\n                  schema:\n                    type: object\n                    properties:\n                      successful:\n                        type: boolean\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const code = '200';\n      const responseModel = new ResponseModel({\n        parser: parser,\n        code: code,\n        defaultAsError: false,\n        infoOrRef: spec.paths['/test'].get.responses[code],\n        options: opts,\n        isEvent: false,\n      });\n\n      expect(responseModel.summary).toBe('Overridden description');\n    });\n\n    test('should not override description in responses for openapi 3.0', () => {\n      const spec = parseYaml(outdent`\n        openapi: 3.0.0\n        paths:\n          /test:\n            get:\n              operationId: test\n              responses:\n                '200':\n                  description: Overridden description\n                  $ref: \"#/components/responses/Successful\"\n        components:\n          responses:\n            Successful:\n              description: successful operation\n              content:\n                application/json:\n                  schema:\n                    type: object\n                    properties:\n                      successful:\n                        type: boolean\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const code = '200';\n      const responseModel = new ResponseModel({\n        parser: parser,\n        code: code,\n        defaultAsError: false,\n        infoOrRef: spec.paths['/test'].get.responses[code],\n        options: opts,\n        isEvent: false,\n      });\n\n      expect(responseModel.summary).toBe('successful operation');\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/Schema.circular.test.ts",
    "content": "import outdent from 'outdent';\nimport { parseYaml } from '@redocly/openapi-core';\n\n/* eslint-disable @typescript-eslint/no-var-requires */\nimport { SchemaModel } from '../../models';\nimport { OpenAPIParser } from '../../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../../RedocNormalizedOptions';\n\nimport { circularDetailsPrinter, printSchema } from './helpers';\n\nconst opts = new RedocNormalizedOptions({}) as RedocNormalizedOptions;\n\ndescribe('Models', () => {\n  describe.only('Schema Circular tracking', () => {\n    let parser;\n\n    expect.addSnapshotSerializer({\n      test: val => typeof val === 'string',\n      print: v => v as string,\n    });\n\n    test('should detect circular for array nested in allOf', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Schema:\n            type: object\n            properties:\n              a: { $ref: '#/components/schemas/Schema' }\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Schema,\n        '#/components/schemas/Schema',\n        opts,\n      );\n\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(\n        `a: <object> !circular`,\n      );\n    });\n\n    test('should not detect circular refs when ref used multiple times across allOf', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Foo:\n            type: object\n            properties:\n              foo: { type: string }\n          Schema:\n            allOf:\n              - $ref: '#/components/schemas/Foo'\n              - type: object\n                properties:\n                  foobar: { $ref: '#/components/schemas/Foo' }\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Schema, '', opts);\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        foo: <string>\n        foobar:\n          foo: <string>\n      `);\n    });\n\n    test('should detect circular for array with self-reference', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Array:\n            type: \"array\"\n            items: { \"$ref\": \"#/components/schemas/Array\" }\n          Schema:\n            allOf: [{ \"$ref\": \"#/components/schemas/Array\" }]\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Schema,\n        '#/components/schemas/Schema',\n        opts,\n      );\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(\n        `[<array> !circular]`,\n      );\n    });\n\n    test('should detect circular for object nested in allOf', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Object:\n            allOf:\n              - $ref: '#/components/schemas/Object'\n              - type: \"object\"\n                properties: { \"a\": { \"$ref\": \"#/components/schemas/Object\" } }\n          Schema:\n            allOf: [{ \"$ref\": \"#/components/schemas/Object\" }]\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Schema,\n        '#/components/schemas/Schema',\n        opts,\n      );\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(\n        `a: <any> !circular`,\n      );\n    });\n\n    test('should not detect circular for base DTO case', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          BaseDTO:\n            type: object\n            properties:\n              id: {type: string}\n          BaseB:\n            type: object\n            allOf:\n              - $ref: '#/components/schemas/BaseDTO'\n              - type: object\n                properties:\n                  fieldB: { type: string }\n          BaseA:\n            type: object\n            allOf:\n              - $ref: '#/components/schemas/BaseDTO'\n              - type: object\n                properties:\n                  b: { $ref: '#/components/schemas/BaseB' }\n                  fieldA: { type: string }\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.BaseA, '', opts);\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        id: <string>\n        b:\n          id: <string>\n          fieldB: <string>\n        fieldA: <string>\n      `);\n    });\n\n    test('should detect circular ref for self referencing discriminator', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          SelfComponentDto:\n            type: object\n            properties:\n              self:\n                type: object\n                discriminator:\n                  propertyName: schemaId\n                  mapping:\n                    title: '#/components/schemas/SelfComponentDto'\n                oneOf:\n                  - $ref: '#/components/schemas/SelfComponentDto'\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.SelfComponentDto, '', opts);\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        self: oneOf\n            title ->\n              self: oneOf\n                  title -> <object> !circular\n      `);\n    });\n\n    test('should detect circular with nested oneOf hoisting', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Node:\n            type: 'object'\n            allOf:\n              - oneOf:\n                - type: object\n                  properties:\n                    parent:\n                      $ref: '#/components/schemas/Node'\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Node, '', opts);\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        oneOf\n          object ->\n            parent: oneOf\n                object ->\n                  parent: <object> !circular\n      `);\n    });\n\n    test('should detect simple props recursion', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          PropRecursion:\n            properties:\n              children:\n                type: object\n                properties:\n                  a:\n                    $ref: '#/components/schemas/PropRecursion'\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.PropRecursion, '', opts);\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        children:\n          a:\n            children:\n              a: <object> !circular\n      `);\n    });\n\n    test('should detect recursion for props with type array', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          PropsRecursion:\n            properties:\n              children:\n                type: array\n                items:\n                  $ref: '#/components/schemas/PropsRecursion'\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.PropsRecursion, '', opts);\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        children: [\n          children: [<object> !circular]\n        ]\n      `);\n    });\n\n    test('should detect and ignore allOf recursion', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Parent:\n            $ref: '#/components/schemas/Child'\n          Child:\n            allOf:\n              - $ref: '#/components/schemas/Parent'\n              - type: object\n                properties:\n                  a:\n                    type: string\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Child,\n        '#/components/schemas/Child',\n        opts,\n      );\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`a: <string>`);\n    });\n\n    test('should detect and ignore allOf recursion in nested prop', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          ExternalReference:\n            type: object\n            allOf:\n              - $ref: '#/components/schemas/CompanyReference'\n              - type: object\n                properties:\n                  externalId: { type: string }\n          CompanyReference:\n            type: object\n            required: [ guid, externalId ]\n            properties:\n              guid: { type: string }\n              nestedRecursive: { $ref: '#/components/schemas/ExternalReference' }\n          Entity:\n            type: object\n            allOf:\n              - $ref: '#/components/schemas/ExternalReference'\n              - type: object\n                properties:\n                  directRecursive: { $ref: '#/components/schemas/ExternalReference' }\n                  selfRecursive: { $ref: '#/components/schemas/Entity' }\n                  anotherField: { $ref: '#/components/schemas/AnotherEntity' }\n          AnotherEntity:\n            type: object\n            allOf:\n              - $ref: '#/components/schemas/CompanyReference'\n              - type: object\n                properties:\n                  someField: { type: number }\n                  anotherSelfRecursive: { $ref: '#/components/schemas/AnotherEntity' }\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Entity,\n        '#/components/schemas/Entity',\n        opts,\n      );\n\n      // TODO: this has a little issue with too early detection in anotherField -> nestedRecursive\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        guid*: <string>\n        nestedRecursive: <object> !circular\n        externalId*: <string>\n        directRecursive:\n          guid*: <string>\n          nestedRecursive: <object> !circular\n          externalId*: <string>\n        selfRecursive: <object> !circular\n        anotherField:\n          guid*: <string>\n          nestedRecursive: <object> !circular\n          someField: <number>\n          anotherSelfRecursive: <object> !circular\n      `);\n    });\n\n    test('should detect and ignore allOf with discriminator recursion', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Pet:\n            type: object\n            required: [ petType ]\n            discriminator:\n              propertyName: petType\n              mapping:\n                cat: '#/components/schemas/Cat'\n                dog: '#/components/schemas/Dog'\n            properties:\n              category: { $ref: '#/components/schemas/Category' }\n              status: { type: string }\n              friend:\n                allOf: [{ $ref: '#/components/schemas/Pet' }]\n              petType: { type: string }\n          Cat:\n            description: A representation of a cat\n            allOf:\n              - $ref: '#/components/schemas/Pet'\n              - type: object\n                properties:\n                  huntingSkill: { type: string }\n          Dog:\n            description: A representation of a dog\n            allOf:\n              - $ref: '#/components/schemas/Pet'\n              - type: object\n                properties:\n                  packSize: { type: integer }\n          Category:\n            type: object\n            properties:\n              name: { type: string }\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Pet,\n        '#/components/schemas/Pet',\n        opts,\n      );\n\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        oneOf\n          cat ->\n            category:\n              name: <string>\n            status: <string>\n            friend: <object> !circular\n            petType*: <string>\n            huntingSkill: <string>\n          dog ->\n            category:\n              name: <string>\n            status: <string>\n            friend: <object> !circular\n            petType*: <string>\n            packSize: <integer>\n      `);\n    });\n\n    test('should detect and recursion on the right level with array of discriminators', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Pet:\n            type: object\n            required: [ petType ]\n            discriminator:\n              propertyName: petType\n              mapping:\n                cat: '#/components/schemas/Cat'\n                dog: '#/components/schemas/Dog'\n            properties:\n              category: { $ref: '#/components/schemas/Category' }\n              status: { type: string }\n              friend:\n                allOf: [{ $ref: '#/components/schemas/Pet' }]\n              petType: { type: string }\n          Cat:\n            description: A representation of a cat\n            allOf:\n              - $ref: '#/components/schemas/Pet'\n              - type: object\n                properties:\n                  huntingSkill: { type: string }\n          Dog:\n            description: A representation of a dog\n            allOf:\n              - $ref: '#/components/schemas/Pet'\n              - type: object\n                properties:\n                  packSize: { type: integer }\n          Category:\n            type: object\n            properties:\n              name: { type: string }\n          Response:\n            type: array\n            items:\n              $ref: '#/components/schemas/Pet'\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Response,\n        '#/components/schemas/Response',\n        opts,\n      );\n\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        [\n        oneOf\n          cat ->\n            category:\n              name: <string>\n            status: <string>\n            friend: <object> !circular\n            petType*: <string>\n            huntingSkill: <string>\n          dog ->\n            category:\n              name: <string>\n            status: <string>\n            friend: <object> !circular\n            petType*: <string>\n            packSize: <integer>\n        ]\n      `);\n    });\n\n    test('should detect and recursion with discriminator and oneOf', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          User:\n            type: object\n            properties:\n              pet:\n                oneOf:\n                  - $ref: '#/components/schemas/Pet'\n          Pet:\n            type: object\n            required: [ petType ]\n            discriminator:\n              propertyName: petType\n              mapping:\n                cat: '#/components/schemas/Cat'\n                dog: '#/components/schemas/Dog'\n            properties:\n              category: { $ref: '#/components/schemas/Category' }\n              status: { type: string }\n              friend:\n                allOf: [{ $ref: '#/components/schemas/Pet' }]\n              petType: { type: string }\n          Cat:\n            description: A representation of a cat\n            allOf:\n              - $ref: '#/components/schemas/Pet'\n              - type: object\n                properties:\n                  huntingSkill: { type: string }\n          Dog:\n            description: A representation of a dog\n            allOf:\n              - $ref: '#/components/schemas/Pet'\n              - type: object\n                properties:\n                  packSize: { type: integer }\n          Category:\n            type: object\n            properties:\n              name: { type: string }\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.User,\n        '#/components/schemas/User',\n        opts,\n      );\n\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n      pet: oneOf\n          Pet -> oneOf\n              cat ->\n                category:\n                  name: <string>\n                status: <string>\n                friend: <object> !circular\n                petType*: <string>\n                huntingSkill: <string>\n              dog ->\n                category:\n                  name: <string>\n                status: <string>\n                friend: <object> !circular\n                petType*: <string>\n                packSize: <integer>\n      `);\n    });\n\n    test('should detect and recursion with nested oneOf', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Tag:\n            type: object\n            properties:\n              name:\n                description: Tag name\n                type: string\n                minLength: 1\n              items:\n                oneOf:\n                  - $ref: \"#/components/schemas/Tag\"\n          User:\n            type: object\n            properties:\n              pet:\n                oneOf:\n                  - $ref: '#/components/schemas/Tag'\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.User,\n        '#/components/schemas/User',\n        opts,\n      );\n\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n      pet: oneOf\n          Tag ->\n            name: <string> (Tag name)\n            items: oneOf\n                Tag -> <object> !circular\n      `);\n    });\n\n    test('should not use discriminator for direct schemas refs in oneOf/anyOf', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Parent:\n            type: object\n            discriminator:\n              propertyName: type\n              mapping:\n                foo: '#/components/schemas/Foo'\n                bar: '#/components/schemas/Bar'\n                baz: '#/components/schemas/Baz'\n            properties:\n              type:\n                type: string\n          Foo:\n            allOf:\n              - $ref: '#/components/schemas/Parent'\n              - type: object\n          Bar:\n            allOf:\n            - $ref: '#/components/schemas/Parent'\n            - type: object\n          Baz:\n            allOf:\n            - $ref: '#/components/schemas/Parent'\n            - type: object\n              properties:\n                nested:\n                  anyOf:\n                    - $ref: '#/components/schemas/Foo'\n                    - $ref: '#/components/schemas/Bar'\n\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Parent,\n        '#/components/schemas/Parent',\n        opts,\n      );\n\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        oneOf\n          foo ->\n            type: <string>\n          bar ->\n            type: <string>\n          baz ->\n            type: <string>\n            nested: oneOf\n                Foo ->\n                  type: <string>\n                Bar ->\n                  type: <string>\n        `);\n    });\n\n    test('should detect and recursion with nested oneOf case same schema', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          Test:\n            allOf:\n              - type: object\n                required:\n                  - \"@relations\"\n                properties:\n                  \"@relations\":\n                    type: object\n                    properties:\n                      A:\n                        $ref: \"#/components/schemas/A\"\n              - type: object\n                required:\n                  - \"@relations\"\n                properties:\n                  \"@relations\":\n                    type: object\n                    properties:\n                      A:\n                        $ref: \"#/components/schemas/A\"\n          A:\n            type: object\n            description: Description\n            properties:\n              B:\n                type: array\n                items:\n                  oneOf:\n                    - type: object\n                    - title: tableLookup\n                      type: object\n                      properties:\n                        fallback:\n                          type: array\n                          default: []\n                          items:\n                            $ref: \"#/components/schemas/A/properties/B\"\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.Test,\n        '#/components/schemas/Test',\n        opts,\n      );\n\n      expect(printSchema(schema, circularDetailsPrinter)).toMatchInlineSnapshot(`\n        @relations*:\n          A:\n            B: [\n              oneOf\n                object -> <object>\n                tableLookup ->\n                  fallback: [\n                    [\n                    oneOf\n                      object -> <object>\n                      tableLookup ->\n                        fallback: [<array> !circular]\n                    ]\n                  ]\n            ]\n        `);\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/Schema.test.ts",
    "content": "/* eslint-disable @typescript-eslint/no-var-requires */\nimport { parseYaml } from '@redocly/openapi-core';\nimport { outdent } from 'outdent';\nimport { MediaTypeModel } from '../../models';\nimport { SchemaModel } from '../../models/Schema';\nimport { OpenAPIParser } from '../../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../../RedocNormalizedOptions';\nimport { enumDetailsPrinter, printSchema } from './helpers';\n\nconst opts = new RedocNormalizedOptions({});\n\ndescribe('Models', () => {\n  describe('Schema', () => {\n    let parser;\n\n    test('parsing nested x-enumDescription', () => {\n      const spec = require('../fixtures/nestedEnumDescroptionSample.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const testSchema = spec.components.schemas.Test;\n      const schemaModel = new SchemaModel(parser, testSchema, '', opts);\n\n      expect(schemaModel['x-enumDescriptions']).toStrictEqual(\n        testSchema.items['x-enumDescriptions'],\n      );\n    });\n\n    test('discriminator with one field', () => {\n      const spec = require('../fixtures/discriminator.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Foo, '', opts);\n      expect(schema.oneOf).toHaveLength(1);\n      expect(schema.discriminatorProp).toEqual('type');\n    });\n\n    test('oneOf/allOf titles', () => {\n      const spec = require('../fixtures/oneOfTitles.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Test, '', opts);\n      expect(schema.fields).toHaveLength(3);\n      const oneOfField = schema.fields![0];\n      expect(oneOfField.schema.displayType).toBe('Foo (object) or Bar (object)');\n      expect(oneOfField.schema.oneOf![0].title).toBe('Foo');\n      expect(oneOfField.schema.oneOf![1].title).toBe('Bar');\n\n      const anyOfField = schema.fields![1];\n      expect(anyOfField.schema.displayType).toBe('Foo (object) or Bar (object)');\n      expect(anyOfField.schema.oneOf![0].title).toBe('Foo');\n      expect(anyOfField.schema.oneOf![1].title).toBe('Bar');\n    });\n\n    test('oneOf/allOf schema complex displayType', () => {\n      const spec = require('../fixtures/oneOfTitles.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.WithArray, '', opts);\n      expect(schema.oneOf).toHaveLength(2);\n      expect(schema.displayType).toBe('(Array of strings or numbers) or string');\n    });\n\n    test('schemaDefinition should resolve double ref', () => {\n      const spec = require('../fixtures/3.1/schemaDefinition.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Parent, '', opts);\n      expect(schema.fields).toHaveLength(1);\n      expect(schema.pointer).toBe('#/components/schemas/Child');\n    });\n\n    test('schemaDefinition should resolve schema with conditional operators', () => {\n      const spec = require('../fixtures/3.1/conditionalSchema.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Test, '', opts);\n      expect(schema.oneOf).toHaveLength(2);\n\n      expect(schema.oneOf![0].schema.title).toBe('=== 10');\n      expect(schema.oneOf![1].schema.title).toBe('case 2');\n\n      expect(schema.oneOf![0].schema).toMatchSnapshot();\n      expect(schema.oneOf![1].schema).toMatchSnapshot();\n    });\n\n    test('schemaDefinition should resolve field with conditional operators', () => {\n      const spec = require('../fixtures/3.1/conditionalField.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Test, '', opts);\n      expect(schema.fields).toHaveLength(1);\n      expect(schema.fields && schema.fields[0].schema.oneOf).toHaveLength(2);\n      expect(schema.fields && schema.fields[0].schema.oneOf![0].schema.title).toBe('isString');\n      expect(schema.fields && schema.fields[0].schema.oneOf![1].schema.title).toBe('notString');\n\n      expect(schema.fields && schema.fields[0].schema.oneOf![0].schema).toMatchSnapshot();\n      expect(schema.fields && schema.fields[0].schema.oneOf![1].schema).toMatchSnapshot();\n    });\n\n    test('schemaDefinition should resolve unevaluatedProperties in properties', () => {\n      const spec = require('../fixtures/3.1/unevaluatedProperties.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Test, '', opts);\n      expect(schema.fields).toHaveLength(2);\n      expect(schema.fields![1].kind).toEqual('additionalProperties');\n      expect(schema.fields![1].schema.type).toEqual('any');\n    });\n\n    test('schemaDefinition should resolve unevaluatedProperties in anyOf', () => {\n      const spec = require('../fixtures/3.1/unevaluatedProperties.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Test2, '', opts);\n      expect(schema.oneOf![0].fields).toHaveLength(2);\n      expect(schema.oneOf![0].fields![1].kind).toEqual('additionalProperties');\n      expect(schema.oneOf![1].fields).toHaveLength(2);\n      expect(schema.oneOf![1].fields![1].kind).toEqual('additionalProperties');\n    });\n\n    test('schemaDefinition should resolve unevaluatedProperties type boolean', () => {\n      const spec = require('../fixtures/3.1/unevaluatedProperties.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Test3, '', opts);\n      expect(schema.fields).toHaveLength(2);\n      expect(schema.fields![1].kind).toEqual('additionalProperties');\n      expect(schema.fields![1].schema.type).toEqual('boolean');\n    });\n\n    test('schemaDefinition should resolve patternProperties', () => {\n      const spec = require('../fixtures/3.1/patternProperties.json');\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(parser, spec.components.schemas.Patterns, '', opts);\n\n      expect(schema.fields).toHaveLength(4);\n      expect(schema.fields![0].kind).toEqual('field');\n      expect(schema.fields![0].name).toEqual('nestedObjectProp');\n      expect(schema.fields![0].schema.type).toEqual('object');\n      expect(schema.fields![0].schema.fields![0].kind).toEqual('patternProperties');\n\n      expect(schema.fields).toHaveLength(4);\n      expect(schema.fields![1].kind).toEqual('field');\n      expect(schema.fields![1].name).toEqual('nestedArrayProp');\n      expect(schema.fields![1].schema.items!.fields![0].kind).toEqual('patternProperties');\n\n      expect(schema.fields![2].kind).toEqual('patternProperties');\n      expect(schema.fields![2].schema.type).toEqual('string');\n      expect(schema.fields![3].kind).toEqual('patternProperties');\n      expect(schema.fields![3].schema.type).toEqual('object');\n    });\n\n    describe('type array', () => {\n      function testImmutablePart(schema: SchemaModel) {\n        expect(schema.minItems).toEqual(1);\n        expect(schema.maxItems).toEqual(10);\n        expect(schema.fields![0].schema.type).toEqual('string');\n        expect(schema.fields![1].schema.type).toEqual('number');\n      }\n      const eachArray = ['../fixtures/3.1/prefixItems.json', '../fixtures/arrayItems.json'];\n\n      test.each(eachArray)(\n        'schemaDefinition should resolve prefixItems without additional items',\n        specFixture => {\n          const spec = require(specFixture);\n          const parser = new OpenAPIParser(spec, undefined, opts);\n          const schema = new SchemaModel(parser, spec.components.schemas.Case1, '', opts);\n\n          testImmutablePart(schema);\n\n          expect(schema.fields).toHaveLength(3);\n          expect(schema.fields![2].name).toEqual('[2]');\n          expect(schema.fields![2].schema.pointer).toEqual('#/components/schemas/Cat');\n          expect(schema.fields![2].schema.type).toEqual('object');\n        },\n      );\n\n      test.each(eachArray)(\n        'schemaDefinition should resolve prefixItems with additional items',\n        specFixture => {\n          const spec = require(specFixture);\n          const parser = new OpenAPIParser(spec, undefined, opts);\n          const schema = new SchemaModel(parser, spec.components.schemas.Case2, '', opts);\n\n          testImmutablePart(schema);\n\n          expect(schema.fields).toHaveLength(4);\n          expect(schema.fields![3].name).toEqual('[3...]');\n          expect(schema.fields![2].schema.type).toEqual('object');\n          expect(schema.fields![2].schema.pointer).toEqual('#/components/schemas/Cat');\n          expect(schema.fields![3].schema.type).toEqual('any');\n        },\n      );\n\n      test.each(eachArray)(\n        'schemaDefinition should resolve prefixItems with additional items with $ref',\n        specFixture => {\n          const spec = require(specFixture);\n          const parser = new OpenAPIParser(spec, undefined, opts);\n          const schema = new SchemaModel(parser, spec.components.schemas.Case3, '', opts);\n\n          testImmutablePart(schema);\n\n          expect(schema.fields).toHaveLength(4);\n          expect(schema.fields![3].name).toEqual('[3...]');\n          expect(schema.fields![2].schema.type).toEqual('object');\n          expect(schema.fields![2].schema.pointer).toEqual('#/components/schemas/Cat');\n          expect(schema.fields![3].schema.type).toEqual('object');\n          expect(schema.fields![3].schema.pointer).toEqual('#/components/schemas/Dog');\n        },\n      );\n\n      test.each(eachArray)(\n        'schemaDefinition should resolve prefixItems with additional schema items',\n        specFixture => {\n          const spec = require(specFixture);\n          const parser = new OpenAPIParser(spec, undefined, opts);\n          const schema = new SchemaModel(parser, spec.components.schemas.Case4, '', opts);\n\n          testImmutablePart(schema);\n\n          expect(schema.fields).toHaveLength(4);\n          expect(schema.fields![3].name).toEqual('[3...]');\n          expect(schema.fields![2].schema.type).toEqual('object');\n          expect(schema.fields![2].schema.pointer).toEqual('#/components/schemas/Cat');\n          expect(schema.fields![3].schema.type).toEqual('object');\n        },\n      );\n\n      test.each(eachArray)(\n        'schemaDefinition should resolve prefixItems with additional array items',\n        specFixture => {\n          const spec = require(specFixture);\n          const parser = new OpenAPIParser(spec, undefined, opts);\n          const schema = new SchemaModel(parser, spec.components.schemas.Case5, '', opts);\n\n          testImmutablePart(schema);\n\n          expect(schema.fields).toHaveLength(4);\n          expect(schema.fields![3].name).toEqual('[3...]');\n          expect(schema.fields![2].schema.type).toEqual('object');\n          expect(schema.fields![2].schema.pointer).toEqual('#/components/schemas/Cat');\n          expect(schema.fields![3].schema.type).toEqual('array');\n          expect(schema.fields![3].schema.fields).toHaveLength(1);\n          expect(schema.fields![3].schema.fields![0].schema.type).toEqual('string');\n          expect(schema.fields![3].schema.fields![0].schema.constraints).toEqual([\n            '>= 0 characters',\n          ]);\n        },\n      );\n\n      test.each(eachArray)(\n        'schemaDefinition should resolve prefixItems with additional array items',\n        specFixture => {\n          const spec = require(specFixture);\n          const parser = new OpenAPIParser(spec, undefined, opts);\n          const schema = new SchemaModel(parser, spec.components.schemas.Case6, '', opts);\n          expect(schema.type).toBe('array');\n          expect(schema.typePrefix).toBe('Array of ');\n          expect(schema.items?.fields).toHaveLength(2);\n          expect(schema.items?.pointer).toEqual('#/components/schemas/Tag');\n          expect(schema.isPrimitive).toBe(false);\n          expect(schema.items?.isPrimitive).toBe(false);\n          expect(schema.minItems).toBe(1);\n        },\n      );\n\n      test.each(eachArray)(\n        'schemaDefinition should resolve items with boolean type',\n        specFixture => {\n          const spec = require(specFixture);\n          const parser = new OpenAPIParser(spec, undefined, opts);\n          const schema = new SchemaModel(parser, spec.components.schemas.Case7, '', opts);\n          expect(schema.fields?.[0].schema?.type).toBe('array');\n          expect(schema.fields?.[0].schema?.typePrefix).toBe('Array of ');\n          expect(schema.fields?.[0].schema.items?.displayType).toBe('any');\n          expect(schema?.fields).toHaveLength(1);\n          expect(schema.fields?.[0].schema.pointer).toEqual('#/components/schemas/AnyArray');\n          expect(schema.fields?.[0].schema.isPrimitive).toBe(true);\n        },\n      );\n    });\n\n    test('should get correct fields data if it includes allOf', () => {\n      const spec = parseYaml(outdent`\n      openapi: 3.0.0\n      components:\n        schemas:\n          User:\n            allOf:\n              - type: object\n                properties:\n                  name:\n                    type: string\n                    description: correct description name\n                    readOnly: false\n                    writeOnly: false\n                  allOf:\n                    - '#/components/schemas/NameField'\n          NameField:\n            type: object\n            description: name description\n            readOnly: true\n            writeOnly: false\n\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const schema = new SchemaModel(\n        parser,\n        spec.components.schemas.User,\n        '#/components/schemas/User',\n        opts,\n      );\n      const fieldSchema = schema.fields?.[0].schema;\n      expect(fieldSchema?.readOnly).toBe(false);\n      expect(fieldSchema?.writeOnly).toBe(false);\n      expect(printSchema(schema)).toMatchInlineSnapshot(`\n        \"name: <string> (correct description name)\n        allOf: <any>\"\n      `);\n    });\n    describe('enum values', () => {\n      test('should get correct fields enum fields without duplication', () => {\n        const spec = parseYaml(outdent`\n          openapi: 3.0.0\n          components:\n            schemas:\n              StringField: { type: string, title: StringField, enum: [A, B, C] }\n              FieldA: { type: string, title: FieldA, enum: [A1, A2, A3] }\n              FieldB: { type: string, title: FieldB, enum: [B1, B2, B3] }\n              FieldC: { type: string, title: FieldC, enum: [C1, C2, C3] }\n              ObjectWithAllOf:\n                title: StringFilter\n                type: object\n                allOf:\n                  - properties:\n                      type: { type: string, enum: [STRING] }\n                      field: { $ref: '#/components/schemas/StringField' }\n                    required: [type, field, values]\n                  - oneOf:\n                      - properties:\n                          field: { type: string, enum: [A] }\n                          values: { type: array, items: { $ref: '#/components/schemas/FieldA' } }\n                      - properties:\n                          field: { type: string, enum: [B] }\n                          values: { type: array, items: { $ref: '#/components/schemas/FieldB' } }\n                      - properties:\n                          field: { type: string, enum: [C] }\n                          values: { type: array, items: { $ref: '#/components/schemas/FieldC' } }\n              ObjectWithOneOf:\n                title: StringFilter\n                type: object\n                properties:\n                  type: { type: string, enum: [STRING] }\n                  field: { $ref: '#/components/schemas/StringField' }\n                required: [type, field, values]\n                oneOf:\n                  - properties:\n                      field: { type: string, enum: [A] }\n                      values: { type: array, items: { $ref: '#/components/schemas/FieldA' } }\n                  - properties:\n                      field: { type: string, enum: [B] }\n                      values: { type: array, items: { $ref: '#/components/schemas/FieldB' } }\n                  - properties:\n                      field: { type: string, enum: [C] }\n                      values: { type: array, items: { $ref: '#/components/schemas/FieldC' } }\n        `) as any;\n\n        parser = new OpenAPIParser(spec, undefined, opts);\n        const schemaWithOneOf = new SchemaModel(\n          parser,\n          spec.components.schemas.ObjectWithOneOf,\n          '#/components/schemas/ObjectWithOneOf',\n          opts,\n        );\n        expect(printSchema(schemaWithOneOf, enumDetailsPrinter)).toMatchInlineSnapshot(`\n          \"oneOf\n            StringFilter ->\n              field*: <string>enum: [A,B,C]\n              values*: [<string>enum: [A1,A2,A3]]\n              type*: <string>enum: [STRING]\n            StringFilter ->\n              field*: <string>enum: [A,B,C]\n              values*: [<string>enum: [B1,B2,B3]]\n              type*: <string>enum: [STRING]\n            StringFilter ->\n              field*: <string>enum: [A,B,C]\n              values*: [<string>enum: [C1,C2,C3]]\n              type*: <string>enum: [STRING]\"\n        `);\n\n        const schemaWithAllOf = new SchemaModel(\n          parser,\n          spec.components.schemas.ObjectWithAllOf,\n          '#/components/schemas/ObjectWithAllOf',\n          opts,\n        );\n        expect(printSchema(schemaWithAllOf, enumDetailsPrinter)).toMatchInlineSnapshot(`\n          \"oneOf\n            object ->\n              type*: <string>enum: [STRING]\n              field*: <string>enum: [A,B,C]\n              values*: [<string>enum: [A1,A2,A3]]\n            object ->\n              type*: <string>enum: [STRING]\n              field*: <string>enum: [B,A,C]\n              values*: [<string>enum: [B1,B2,B3]]\n            object ->\n              type*: <string>enum: [STRING]\n              field*: <string>enum: [C,A,B]\n              values*: [<string>enum: [C1,C2,C3]]\"\n        `);\n      });\n\n      test('should get correct fields enum limits', () => {\n        const spec = parseYaml(outdent`\n          openapi: 3.0.0\n          components:\n            schemas:\n              StringField: { type: string, title: StringField, enum: [A, B, C] }\n              FieldA: { type: string, title: FieldA, enum: [A1, A2, A3] }\n              FieldB: { type: string, title: FieldB, enum: [B1, B2, B3] }\n              FieldC: { type: string, title: FieldC, enum: [C1, C2, C3] }\n              ObjectWithAllOf:\n                title: StringFilter\n                type: object\n                allOf:\n                  - properties:\n                      type: { type: string, enum: [STRING] }\n                    required: [type, field, values]\n                  - oneOf:\n                      - properties:\n                          field: { type: string, enum: [A] }\n                          values: { type: array, items: { $ref: '#/components/schemas/FieldA' } }\n                      - properties:\n                          field: { type: string, enum: [B] }\n                          values: { type: array, items: { $ref: '#/components/schemas/FieldB' } }\n                      - properties:\n                          field: { type: string, enum: [C] }\n                          values: { type: array, items: { $ref: '#/components/schemas/FieldC' } }\n              ObjectWithOneOf:\n                title: StringFilter\n                type: object\n                properties:\n                  type: { type: string, enum: [STRING] }\n                required: [type, field, values]\n                oneOf:\n                  - properties:\n                      field: { type: string, enum: [A] }\n                      values: { type: array, items: { $ref: '#/components/schemas/FieldA' } }\n                  - properties:\n                      field: { type: string, enum: [B] }\n                      values: { type: array, items: { $ref: '#/components/schemas/FieldB' } }\n                  - properties:\n                      field: { type: string, enum: [C] }\n                      values: { type: array, items: { $ref: '#/components/schemas/FieldC' } }\n        `) as any;\n\n        parser = new OpenAPIParser(spec, undefined, opts);\n        const schemaWithOneOf = new SchemaModel(\n          parser,\n          spec.components.schemas.ObjectWithOneOf,\n          '#/components/schemas/ObjectWithOneOf',\n          opts,\n        );\n        expect(printSchema(schemaWithOneOf, enumDetailsPrinter)).toMatchInlineSnapshot(`\n          \"oneOf\n            StringFilter ->\n              field*: <string>enum: [A]\n              values*: [<string>enum: [A1,A2,A3]]\n              type*: <string>enum: [STRING]\n            StringFilter ->\n              field*: <string>enum: [B]\n              values*: [<string>enum: [B1,B2,B3]]\n              type*: <string>enum: [STRING]\n            StringFilter ->\n              field*: <string>enum: [C]\n              values*: [<string>enum: [C1,C2,C3]]\n              type*: <string>enum: [STRING]\"\n        `);\n\n        const schemaWithAllOf = new SchemaModel(\n          parser,\n          spec.components.schemas.ObjectWithAllOf,\n          '#/components/schemas/ObjectWithAllOf',\n          opts,\n        );\n        expect(printSchema(schemaWithAllOf, enumDetailsPrinter)).toMatchInlineSnapshot(`\n          \"oneOf\n            object ->\n              type*: <string>enum: [STRING]\n              field*: <string>enum: [A]\n              values*: [<string>enum: [A1,A2,A3]]\n            object ->\n              type*: <string>enum: [STRING]\n              field*: <string>enum: [B]\n              values*: [<string>enum: [B1,B2,B3]]\n            object ->\n              type*: <string>enum: [STRING]\n              field*: <string>enum: [C]\n              values*: [<string>enum: [C1,C2,C3]]\"\n        `);\n      });\n    });\n\n    test('should get correct sibling inside schema type for openapi 3.1', () => {\n      const spec = parseYaml(outdent`\n        openapi: 3.1.0\n        paths:\n          /test:\n            get:\n              operationId: test\n              responses:\n                '200':\n                  content:\n                    application/json:\n                      schema:\n                        type: object\n                        properties:\n                          testAttr:\n                            description: Overridden description\n                            type: string\n                            $ref: '#/components/schemas/Test'\n        components:\n          schemas:\n            Test:\n              type: object\n              description: Refed description\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const name = 'application/json';\n      const mediaType = new MediaTypeModel(\n        parser,\n        name,\n        true,\n        spec.paths['/test'].get.responses['200'].content[name],\n        opts,\n      );\n\n      expect(printSchema(mediaType?.schema as any)).toMatchInlineSnapshot(\n        `\"testAttr: <string> (Overridden description)\"`,\n      );\n    });\n\n    test('should not override schema in openapi 3.0', () => {\n      const spec = parseYaml(outdent`\n        openapi: 3.0.0\n        paths:\n          /test:\n            get:\n              operationId: test\n              responses:\n                '200':\n                  content:\n                    application/json:\n                      schema:\n                        type: object\n                        properties:\n                          testAttr:\n                            type: string\n                            description: Overridden description\n                            $ref: '#/components/schemas/Test'\n        components:\n          schemas:\n            Test:\n              type: object\n              description: Refed description\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const name = 'application/json';\n      const mediaType = new MediaTypeModel(\n        parser,\n        name,\n        true,\n        spec.paths['/test'].get.responses['200'].content[name],\n        opts,\n      );\n\n      expect(printSchema(mediaType?.schema as any)).toMatchInlineSnapshot(\n        `\"testAttr: <object> (Refed description)\"`,\n      );\n    });\n\n    test('should correct get title from in oneOf ->const', () => {\n      const spec = parseYaml(outdent`\n        openapi: 3.0.0\n        paths:\n          /test:\n            get:\n              operationId: test\n              responses:\n                '200':\n                  content:\n                    application/json:\n                      schema:\n                        type: object\n                        properties:\n                          data:\n                            type: object\n                            properties:\n                              response_code:\n                                type: integer\n                                description: A numeric response code\n                                oneOf:\n                                  - const: 0\n                                    description: >\n                                      Description for const 0\n                                  - const: 1\n                                    description: >\n                                      Description for const 1\n                                  - const: 2\n                                    description: >\n                                      Description for const 2\n      `) as any;\n\n      parser = new OpenAPIParser(spec, undefined, opts);\n      const name = 'application/json';\n      const mediaType = new MediaTypeModel(\n        parser,\n        name,\n        true,\n        spec.paths['/test'].get.responses['200'].content[name],\n        opts,\n      );\n\n      expect(printSchema(mediaType?.schema as any)).toMatchInlineSnapshot(`\n        \"data:\n          response_code: oneOf\n              0 -> <integer> (Description for const 0\n        )\n              1 -> <integer> (Description for const 1\n        )\n              2 -> <integer> (Description for const 2\n        )\"\n      `);\n    });\n  });\n});\n"
  },
  {
    "path": "src/services/__tests__/models/__snapshots__/Schema.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`Models Schema schemaDefinition should resolve field with conditional operators 1`] = `\n{\n  \"allOf\": undefined,\n  \"default\": undefined,\n  \"description\": undefined,\n  \"items\": {\n    \"allOf\": undefined,\n    \"description\": undefined,\n    \"format\": \"url\",\n    \"readOnly\": undefined,\n    \"title\": undefined,\n    \"type\": \"string\",\n    \"writeOnly\": undefined,\n    \"x-circular-ref\": undefined,\n    \"x-parentRefs\": [],\n  },\n  \"maxItems\": 20,\n  \"minItems\": 1,\n  \"readOnly\": undefined,\n  \"title\": \"isString\",\n  \"type\": \"string\",\n  \"writeOnly\": undefined,\n  \"x-circular-ref\": undefined,\n  \"x-displayName\": \"isString\",\n  \"x-parentRefs\": [],\n}\n`;\n\nexports[`Models Schema schemaDefinition should resolve field with conditional operators 2`] = `\n{\n  \"allOf\": undefined,\n  \"default\": undefined,\n  \"description\": undefined,\n  \"items\": {\n    \"allOf\": undefined,\n    \"description\": undefined,\n    \"format\": \"url\",\n    \"readOnly\": undefined,\n    \"title\": undefined,\n    \"type\": \"string\",\n    \"writeOnly\": undefined,\n    \"x-circular-ref\": undefined,\n    \"x-parentRefs\": [],\n  },\n  \"maxItems\": 10,\n  \"minItems\": 1,\n  \"pattern\": \"\\\\d+\",\n  \"readOnly\": undefined,\n  \"title\": \"notString\",\n  \"type\": [\n    \"string\",\n    \"integer\",\n    \"null\",\n  ],\n  \"writeOnly\": undefined,\n  \"x-circular-ref\": undefined,\n  \"x-displayName\": \"notString\",\n  \"x-parentRefs\": [],\n}\n`;\n\nexports[`Models Schema schemaDefinition should resolve schema with conditional operators 1`] = `\n{\n  \"allOf\": undefined,\n  \"description\": undefined,\n  \"maxItems\": 2,\n  \"properties\": {\n    \"test\": {\n      \"allOf\": undefined,\n      \"description\": \"The list of URL to a cute photos featuring pet\",\n      \"enum\": [\n        10,\n      ],\n      \"items\": {\n        \"allOf\": undefined,\n        \"description\": undefined,\n        \"format\": \"url\",\n        \"readOnly\": undefined,\n        \"title\": undefined,\n        \"type\": \"string\",\n        \"writeOnly\": undefined,\n        \"x-circular-ref\": undefined,\n        \"x-parentRefs\": [],\n      },\n      \"maxItems\": 20,\n      \"minItems\": 1,\n      \"readOnly\": undefined,\n      \"title\": undefined,\n      \"type\": [\n        \"string\",\n        \"integer\",\n        \"null\",\n      ],\n      \"writeOnly\": undefined,\n      \"x-circular-ref\": undefined,\n      \"x-parentRefs\": [],\n      \"x-refsStack\": [\n        \"/oneOf/0\",\n      ],\n    },\n  },\n  \"readOnly\": undefined,\n  \"title\": \"=== 10\",\n  \"type\": \"object\",\n  \"writeOnly\": undefined,\n  \"x-circular-ref\": undefined,\n  \"x-parentRefs\": [],\n}\n`;\n\nexports[`Models Schema schemaDefinition should resolve schema with conditional operators 2`] = `\n{\n  \"allOf\": undefined,\n  \"description\": undefined,\n  \"maxItems\": 20,\n  \"properties\": {\n    \"test\": {\n      \"description\": \"The list of URL to a cute photos featuring pet\",\n      \"items\": {\n        \"format\": \"url\",\n        \"type\": \"string\",\n      },\n      \"maxItems\": 20,\n      \"minItems\": 1,\n      \"type\": [\n        \"string\",\n        \"integer\",\n        \"null\",\n      ],\n      \"x-refsStack\": [\n        \"/oneOf/1\",\n      ],\n    },\n  },\n  \"readOnly\": undefined,\n  \"title\": \"case 2\",\n  \"type\": \"object\",\n  \"writeOnly\": undefined,\n  \"x-circular-ref\": undefined,\n  \"x-parentRefs\": [],\n}\n`;\n"
  },
  {
    "path": "src/services/__tests__/models/helpers.ts",
    "content": "import type { SchemaModel } from '../../models';\n\nfunction printType(type: string | string[]): string {\n  return `<${type}>`;\n}\n\nfunction printDescription(description: string | string[]): string {\n  return description ? ` (${description})` : '';\n}\n\nexport function circularDetailsPrinter(schema: SchemaModel): string {\n  return schema.isCircular ? ' !circular' : '';\n}\n\nexport function enumDetailsPrinter(schema: SchemaModel): string {\n  return schema.enum ? `enum: [${schema.enum.toString()}]` : '';\n}\n\nexport function printSchema(\n  schema: SchemaModel,\n  detailsPrinter: (schema: SchemaModel) => string = () => '',\n  identLevel = 0,\n  inline = false,\n): string {\n  if (!schema) return '';\n  const ident = '  '.repeat(identLevel);\n\n  if (schema.isPrimitive || schema.isCircular) {\n    if (schema.type === 'array' && schema.items) {\n      return `${inline ? ' ' : ident}[${printType(schema.items.type)}${detailsPrinter(\n        schema.items,\n      )}]${printDescription(schema.items.description)}`;\n    } else {\n      return `${inline ? ' ' : ident}${printType(schema.displayType)}${detailsPrinter(\n        schema,\n      )}${printDescription(schema.description)}`;\n    }\n  }\n\n  if (schema.oneOf) {\n    return (\n      `${inline ? ' ' : ident}oneOf\\n` +\n      schema.oneOf\n        .map(sub => {\n          return (\n            `${ident}  ${sub.title || sub.displayType} ->` +\n            printSchema(sub, detailsPrinter, identLevel + 2, true)\n          );\n        })\n        .join('\\n')\n    );\n  }\n\n  if (schema.fields) {\n    const prefix = inline ? '\\n' : '';\n    return (\n      prefix +\n      schema.fields\n        .map(f => {\n          return `${ident}${f.name}${f.required ? '*' : ''}:${printSchema(\n            f.schema,\n            detailsPrinter,\n            identLevel + 1,\n            true,\n          )}`;\n        })\n        .join('\\n')\n    );\n  }\n\n  if (schema.items) {\n    return (\n      `${inline ? ' ' : ident}[\\n` +\n      printSchema(schema.items, detailsPrinter, identLevel) +\n      `\\n${inline ? ident.slice(0, -2) : ident}]`\n    );\n  }\n\n  return ' error';\n}\n"
  },
  {
    "path": "src/services/__tests__/prism.test.ts",
    "content": "import { highlight, mapLang } from '../../utils/highlight';\n\ndescribe('prism.js helpers', () => {\n  test('mapLang should map \"json\" to \"js\"', () => {\n    expect(mapLang('json')).toBe('js');\n  });\n\n  test('mapLang should map to \"clike\" by default', () => {\n    expect(mapLang('non-existring')).toBe('clike');\n  });\n\n  test('highlight js code', () => {\n    expect(highlight('const t = 10;', 'js')).toMatchSnapshot();\n  });\n\n  test('highlight raw text should just return text', () => {\n    expect(highlight('Hello world', 'clike')).toBe('Hello world');\n  });\n\n  test('highlight should not throw with lang undefined', () => {\n    expect(highlight('Hello world', undefined)).toBe('Hello world');\n  });\n});\n"
  },
  {
    "path": "src/services/index.ts",
    "content": "export * from './AppStore';\nexport * from './OpenAPIParser';\nexport * from './MarkdownRenderer';\nexport * from './MenuStore';\nexport * from './ScrollService';\nexport * from './SpecStore';\nexport * from './ClipboardService';\nexport * from './HistoryService';\nexport * from './models';\nexport * from './RedocNormalizedOptions';\nexport * from './MenuBuilder';\nexport * from './SearchStore';\nexport * from './MarkerService';\nexport * from './types';\n"
  },
  {
    "path": "src/services/models/ApiInfo.ts",
    "content": "import type { OpenAPIContact, OpenAPIInfo, OpenAPILicense } from '../../types';\nimport { IS_BROWSER } from '../../utils/';\nimport { l } from '../Labels';\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport { RedocNormalizedOptions } from '../RedocNormalizedOptions';\n\nexport class ApiInfoModel implements OpenAPIInfo {\n  title: string;\n  version: string;\n\n  description: string;\n  summary: string;\n  termsOfService?: string;\n  contact?: OpenAPIContact;\n  license?: OpenAPILicense;\n\n  downloadUrls: {\n    title?: string;\n    url?: string;\n  }[];\n  downloadFileName?: string;\n\n  constructor(\n    private parser: OpenAPIParser,\n    private options: RedocNormalizedOptions = new RedocNormalizedOptions({}),\n  ) {\n    Object.assign(this, parser.spec.info);\n    this.description = parser.spec.info.description || '';\n    this.summary = parser.spec.info.summary || '';\n\n    const firstHeadingLinePos = this.description.search(/^\\s*##?\\s+/m);\n    if (firstHeadingLinePos > -1) {\n      this.description = this.description.substring(0, firstHeadingLinePos);\n    }\n\n    this.downloadUrls = this.getDownloadUrls();\n    this.downloadFileName = this.getDownloadFileName();\n  }\n  private getDownloadUrls() {\n    return (\n      !this.options.downloadUrls\n        ? [\n            {\n              title: l('download'),\n              url: this.getDownloadLink(this.options.downloadDefinitionUrl),\n            },\n          ]\n        : this.options.downloadUrls.map(({ title, url }) => ({\n            title: title || l('download'),\n            url: this.getDownloadLink(url),\n          }))\n    ).filter(({ title, url }) => title && url);\n  }\n\n  private getDownloadLink(url?: string): string | undefined {\n    if (url) {\n      return url;\n    }\n\n    if (this.parser.specUrl) {\n      return this.parser.specUrl;\n    }\n\n    if (IS_BROWSER && window.Blob && window.URL && window.URL.createObjectURL) {\n      const blob = new Blob([JSON.stringify(this.parser.spec, null, 2)], {\n        type: 'application/json',\n      });\n      return window.URL.createObjectURL(blob);\n    }\n  }\n\n  private getDownloadFileName(): string | undefined {\n    if (!this.parser.specUrl && !this.options.downloadDefinitionUrl) {\n      return this.options.downloadFileName || 'openapi.json';\n    }\n    return this.options.downloadFileName;\n  }\n}\n"
  },
  {
    "path": "src/services/models/Callback.ts",
    "content": "import { action, observable, makeObservable } from 'mobx';\n\nimport { isOperationName, JsonPointer } from '../../utils';\nimport { OperationModel } from './Operation';\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport type { OpenAPICallback, Referenced } from '../../types';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\n\nexport class CallbackModel {\n  @observable\n  expanded: boolean = false;\n\n  name: string;\n  operations: OperationModel[] = [];\n\n  constructor(\n    parser: OpenAPIParser,\n    name: string,\n    infoOrRef: Referenced<OpenAPICallback>,\n    pointer: string,\n    options: RedocNormalizedOptions,\n  ) {\n    makeObservable(this);\n\n    this.name = name;\n    const { resolved: paths } = parser.deref<OpenAPICallback>(infoOrRef);\n\n    for (const pathName of Object.keys(paths)) {\n      const path = paths[pathName];\n      const operations = Object.keys(path).filter(isOperationName);\n      for (const operationName of operations) {\n        const operationInfo = path[operationName];\n\n        const operation = new OperationModel(\n          parser,\n          {\n            ...operationInfo,\n            pathName,\n            pointer: JsonPointer.compile([pointer, name, pathName, operationName]),\n            httpVerb: operationName,\n            pathParameters: path.parameters || [],\n            pathServers: path.servers,\n          },\n          undefined,\n          options,\n          true,\n        );\n\n        this.operations.push(operation);\n      }\n    }\n  }\n\n  @action\n  toggle() {\n    this.expanded = !this.expanded;\n  }\n}\n"
  },
  {
    "path": "src/services/models/Example.ts",
    "content": "import type { OpenAPIEncoding, OpenAPIExample, Referenced } from '../../types';\nimport { isFormUrlEncoded, isJsonLike, urlFormEncodePayload } from '../../utils/openapi';\nimport type { OpenAPIParser } from '../OpenAPIParser';\n\nconst externalExamplesCache: { [url: string]: Promise<any> } = {};\n\nexport class ExampleModel {\n  value: any;\n  summary?: string;\n  description?: string;\n  externalValueUrl?: string;\n\n  constructor(\n    parser: OpenAPIParser,\n    infoOrRef: Referenced<OpenAPIExample>,\n    public mime: string,\n    encoding?: { [field: string]: OpenAPIEncoding },\n  ) {\n    const { resolved: example } = parser.deref(infoOrRef);\n    this.value = example.value;\n    this.summary = example.summary;\n    this.description = example.description;\n    if (example.externalValue) {\n      this.externalValueUrl = new URL(example.externalValue, parser.specUrl).href;\n    }\n\n    if (isFormUrlEncoded(mime) && this.value && typeof this.value === 'object') {\n      this.value = urlFormEncodePayload(this.value, encoding);\n    }\n  }\n\n  getExternalValue(mimeType: string): Promise<any> {\n    if (!this.externalValueUrl) {\n      return Promise.resolve(undefined);\n    }\n\n    if (this.externalValueUrl in externalExamplesCache) {\n      return externalExamplesCache[this.externalValueUrl];\n    }\n\n    externalExamplesCache[this.externalValueUrl] = fetch(this.externalValueUrl).then(res => {\n      return res.text().then(txt => {\n        if (!res.ok) {\n          return Promise.reject(new Error(txt));\n        }\n\n        if (isJsonLike(mimeType)) {\n          try {\n            return JSON.parse(txt);\n          } catch (e) {\n            return txt;\n          }\n        } else {\n          return txt;\n        }\n      });\n    });\n\n    return externalExamplesCache[this.externalValueUrl];\n  }\n}\n"
  },
  {
    "path": "src/services/models/Field.ts",
    "content": "import { action, observable, makeObservable } from 'mobx';\n\nimport type {\n  OpenAPIParameter,\n  OpenAPIParameterLocation,\n  OpenAPIParameterStyle,\n  Referenced,\n} from '../../types';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\n\nimport { extractExtensions } from '../../utils/openapi';\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport { SchemaModel } from './Schema';\nimport { ExampleModel } from './Example';\nimport { isArray, mapValues } from '../../utils/helpers';\n\nconst DEFAULT_SERIALIZATION: Record<\n  OpenAPIParameterLocation,\n  { explode: boolean; style: OpenAPIParameterStyle }\n> = {\n  path: {\n    style: 'simple',\n    explode: false,\n  },\n  query: {\n    style: 'form',\n    explode: true,\n  },\n  header: {\n    style: 'simple',\n    explode: false,\n  },\n  cookie: {\n    style: 'form',\n    explode: true,\n  },\n};\n\n/**\n * Field or Parameter model ready to be used by components\n */\nexport class FieldModel {\n  @observable\n  expanded: boolean | undefined = undefined;\n\n  schema: SchemaModel;\n  name: string;\n  required: boolean;\n  description: string;\n  example?: string;\n  examples?: Record<string, ExampleModel> | any[];\n  deprecated: boolean;\n  in?: OpenAPIParameterLocation;\n  kind: string;\n  extensions?: Record<string, any>;\n  explode: boolean;\n  style?: OpenAPIParameterStyle;\n  const?: any;\n\n  serializationMime?: string;\n\n  constructor(\n    parser: OpenAPIParser,\n    infoOrRef: Referenced<OpenAPIParameter> & { name?: string; kind?: string },\n    pointer: string,\n    options: RedocNormalizedOptions,\n    refsStack?: string[],\n  ) {\n    makeObservable(this);\n\n    const { resolved: info } = parser.deref<OpenAPIParameter>(infoOrRef);\n    this.kind = infoOrRef.kind || 'field';\n    this.name = infoOrRef.name || info.name;\n    this.in = info.in;\n    this.required = !!info.required;\n\n    let fieldSchema = info.schema;\n    let serializationMime = '';\n    if (!fieldSchema && info.in && info.content) {\n      serializationMime = Object.keys(info.content)[0];\n      fieldSchema = info.content[serializationMime] && info.content[serializationMime].schema;\n    }\n\n    this.schema = new SchemaModel(parser, fieldSchema || {}, pointer, options, false, refsStack);\n    this.description =\n      info.description === undefined ? this.schema.description || '' : info.description;\n    this.example = info.example || this.schema.example;\n\n    if (info.examples !== undefined || this.schema.examples !== undefined) {\n      const exampleValue = info.examples || this.schema.examples;\n      this.examples = isArray(exampleValue)\n        ? exampleValue\n        : mapValues(\n            exampleValue!,\n            (example, name) => new ExampleModel(parser, example, name, info.encoding),\n          );\n    }\n\n    if (serializationMime) {\n      this.serializationMime = serializationMime;\n    } else if (info.style) {\n      this.style = info.style;\n    } else if (this.in) {\n      this.style = DEFAULT_SERIALIZATION[this.in]?.style ?? 'form'; // fallback to from in case \"in\" is invalid\n    }\n\n    if (info.explode === undefined && this.in) {\n      this.explode = DEFAULT_SERIALIZATION[this.in]?.explode ?? true;\n    } else {\n      this.explode = !!info.explode;\n    }\n\n    this.deprecated = info.deprecated === undefined ? !!this.schema.deprecated : info.deprecated;\n\n    if (options.showExtensions) {\n      this.extensions = extractExtensions(info, options.showExtensions);\n    }\n\n    this.const = this.schema?.const || info?.const || '';\n  }\n\n  @action\n  toggle() {\n    this.expanded = !this.expanded;\n  }\n\n  @action\n  collapse(): void {\n    this.expanded = false;\n  }\n\n  @action\n  expand(): void {\n    this.expanded = true;\n  }\n}\n"
  },
  {
    "path": "src/services/models/Group.model.ts",
    "content": "import { action, observable, makeObservable } from 'mobx';\n\nimport type { OpenAPIExternalDocumentation, OpenAPITag } from '../../types';\nimport { safeSlugify } from '../../utils';\nimport { MarkdownRenderer } from '../MarkdownRenderer';\nimport type { ContentItemModel, IMenuItem, MarkdownHeading, MenuItemGroupType } from '../types';\n\n/**\n * Operations Group model ready to be used by components\n */\nexport class GroupModel implements IMenuItem {\n  //#region IMenuItem fields\n  id: string;\n  absoluteIdx?: number;\n  name: string;\n  sidebarLabel: string;\n  description?: string;\n  type: MenuItemGroupType;\n\n  items: ContentItemModel[] = [];\n  parent?: GroupModel;\n  externalDocs?: OpenAPIExternalDocumentation;\n\n  @observable\n  active: boolean = false;\n  @observable\n  expanded: boolean = false;\n\n  depth: number;\n  level: number;\n  //#endregion\n\n  constructor(\n    type: MenuItemGroupType,\n    tagOrGroup: OpenAPITag | MarkdownHeading,\n    parent?: GroupModel,\n  ) {\n    makeObservable(this);\n\n    // markdown headings already have ids calculated as they are needed for heading anchors\n    this.id = (tagOrGroup as MarkdownHeading).id || type + '/' + safeSlugify(tagOrGroup.name);\n    this.type = type;\n    this.name = tagOrGroup['x-displayName'] || tagOrGroup.name;\n    this.level = (tagOrGroup as MarkdownHeading).level || 1;\n\n    this.sidebarLabel = this.name;\n\n    // remove sections from markdown, same as in ApiInfo\n    this.description = tagOrGroup.description || '';\n\n    const items = (tagOrGroup as MarkdownHeading).items;\n    if (items && items.length) {\n      this.description = MarkdownRenderer.getTextBeforeHading(this.description, items[0].name);\n    }\n\n    this.parent = parent;\n    this.externalDocs = (tagOrGroup as OpenAPITag).externalDocs;\n\n    // groups are active (expanded) by default\n    if (this.type === 'group') {\n      this.expanded = true;\n    }\n  }\n\n  @action\n  activate() {\n    this.active = true;\n  }\n\n  @action\n  expand() {\n    if (this.parent) {\n      this.parent.expand();\n    }\n    this.expanded = true;\n  }\n\n  @action\n  collapse() {\n    // disallow collapsing groups\n    if (this.type === 'group') {\n      return;\n    }\n    this.expanded = false;\n  }\n\n  @action\n  deactivate() {\n    this.active = false;\n  }\n}\n"
  },
  {
    "path": "src/services/models/MediaContent.ts",
    "content": "import { action, computed, observable, makeObservable } from 'mobx';\n\nimport type { OpenAPIMediaType } from '../../types';\nimport { MediaTypeModel } from './MediaType';\n\nimport { mergeSimilarMediaTypes } from '../../utils';\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\n\n/**\n * MediaContent model ready to be sued by React components\n * Contains multiple MediaTypes and keeps track of the currently active one\n */\nexport class MediaContentModel {\n  mediaTypes: MediaTypeModel[];\n\n  @observable\n  activeMimeIdx = 0;\n\n  /**\n   * @param isRequestType needed to know if skipe RO/RW fields in objects\n   */\n  constructor(\n    parser: OpenAPIParser,\n    info: Record<string, OpenAPIMediaType>,\n    public isRequestType: boolean,\n    options: RedocNormalizedOptions,\n  ) {\n    makeObservable(this);\n\n    if (options.unstable_ignoreMimeParameters) {\n      info = mergeSimilarMediaTypes(info);\n    }\n    this.mediaTypes = Object.keys(info).map(name => {\n      const mime = info[name];\n      // reset deref cache just in case something is left there\n      return new MediaTypeModel(parser, name, isRequestType, mime, options);\n    });\n  }\n\n  /**\n   * Set active media type by index\n   * @param idx media type index\n   */\n  @action\n  activate(idx: number) {\n    this.activeMimeIdx = idx;\n  }\n\n  @computed\n  get active() {\n    return this.mediaTypes[this.activeMimeIdx];\n  }\n\n  get hasSample(): boolean {\n    return this.mediaTypes.filter(mime => !!mime.examples).length > 0;\n  }\n}\n"
  },
  {
    "path": "src/services/models/MediaType.ts",
    "content": "import * as Sampler from 'openapi-sampler';\n\nimport type { OpenAPIMediaType } from '../../types';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\nimport { SchemaModel } from './Schema';\n\nimport { isJsonLike, mapValues } from '../../utils';\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport { ExampleModel } from './Example';\n\nexport class MediaTypeModel {\n  examples?: { [name: string]: ExampleModel };\n  schema?: SchemaModel;\n  name: string;\n  isRequestType: boolean;\n  onlyRequiredInSamples: boolean;\n  generatedSamplesMaxDepth: number;\n\n  /**\n   * @param isRequestType needed to know if skipe RO/RW fields in objects\n   */\n  constructor(\n    parser: OpenAPIParser,\n    name: string,\n    isRequestType: boolean,\n    info: OpenAPIMediaType,\n    options: RedocNormalizedOptions,\n  ) {\n    this.name = name;\n    this.isRequestType = isRequestType;\n    this.schema = info.schema && new SchemaModel(parser, info.schema, '', options);\n    this.onlyRequiredInSamples = options.onlyRequiredInSamples;\n    this.generatedSamplesMaxDepth = options.generatedSamplesMaxDepth;\n    if (info.examples !== undefined) {\n      this.examples = mapValues(\n        info.examples,\n        example => new ExampleModel(parser, example, name, info.encoding),\n      );\n    } else if (info.example !== undefined) {\n      this.examples = {\n        default: new ExampleModel(\n          parser,\n          { value: parser.deref(info.example).resolved },\n          name,\n          info.encoding,\n        ),\n      };\n    } else if (isJsonLike(name)) {\n      this.generateExample(parser, info);\n    }\n  }\n\n  generateExample(parser: OpenAPIParser, info: OpenAPIMediaType) {\n    const samplerOptions = {\n      skipReadOnly: this.isRequestType,\n      skipWriteOnly: !this.isRequestType,\n      skipNonRequired: this.isRequestType && this.onlyRequiredInSamples,\n      maxSampleDepth: this.generatedSamplesMaxDepth,\n    };\n    if (this.schema && this.schema.oneOf) {\n      this.examples = {};\n      for (const subSchema of this.schema.oneOf) {\n        const sample = Sampler.sample(subSchema.rawSchema as any, samplerOptions, parser.spec);\n\n        if (this.schema.discriminatorProp && typeof sample === 'object' && sample) {\n          sample[this.schema.discriminatorProp] = subSchema.title;\n        }\n\n        this.examples[subSchema.title] = new ExampleModel(\n          parser,\n          {\n            value: sample,\n          },\n          this.name,\n          info.encoding,\n        );\n      }\n    } else if (this.schema) {\n      this.examples = {\n        default: new ExampleModel(\n          parser,\n          {\n            value: Sampler.sample(info.schema as any, samplerOptions, parser.spec),\n          },\n          this.name,\n          info.encoding,\n        ),\n      };\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/models/Operation.ts",
    "content": "import { action, observable, makeObservable } from 'mobx';\n\nimport {\n  extractExtensions,\n  getOperationSummary,\n  getStatusCodeType,\n  isStatusCode,\n  memoize,\n  mergeParams,\n  normalizeServers,\n  sortByField,\n  sortByRequired,\n} from '../../utils';\n\nimport { GroupModel } from './Group.model';\nimport { SecurityRequirementModel } from './SecurityRequirement';\nimport { CallbackModel } from './Callback';\nimport { FieldModel } from './Field';\nimport { RequestBodyModel } from './RequestBody';\nimport { ResponseModel } from './Response';\nimport { SideNavStyleEnum } from '../types';\n\nimport type {\n  OpenAPIExternalDocumentation,\n  OpenAPIServer,\n  OpenAPIXBadges,\n  OpenAPIXCodeSample,\n} from '../../types';\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\nimport type { MediaContentModel } from './MediaContent';\nimport type { ContentItemModel, ExtendedOpenAPIOperation, IMenuItem } from '../types';\n\nexport interface XPayloadSample {\n  lang: 'payload';\n  label: string;\n  requestBodyContent: MediaContentModel;\n  source: string;\n}\n\nexport function isPayloadSample(\n  sample: XPayloadSample | OpenAPIXCodeSample,\n): sample is XPayloadSample {\n  return sample.lang === 'payload' && (sample as any).requestBodyContent;\n}\n\nlet isCodeSamplesWarningPrinted = false;\n\n/**\n * Operation model ready to be used by components\n */\nexport class OperationModel implements IMenuItem {\n  //#region IMenuItem fields\n  id: string;\n  absoluteIdx?: number;\n  name: string;\n  sidebarLabel: string;\n  description?: string;\n  type = 'operation' as const;\n\n  parent?: GroupModel;\n  externalDocs?: OpenAPIExternalDocumentation;\n  items: ContentItemModel[] = [];\n\n  depth: number;\n\n  @observable\n  ready?: boolean = true;\n  @observable\n  active: boolean = false;\n  @observable\n  expanded: boolean = false;\n  //#endregion\n\n  pointer: string;\n  operationId?: string;\n  operationHash?: string;\n  httpVerb: string;\n  badges: OpenAPIXBadges[];\n  deprecated: boolean;\n  path: string;\n  servers: OpenAPIServer[];\n  security: SecurityRequirementModel[];\n  extensions: Record<string, any>;\n  isCallback: boolean;\n  isWebhook: boolean;\n  isEvent: boolean;\n\n  constructor(\n    private parser: OpenAPIParser,\n    private operationSpec: ExtendedOpenAPIOperation,\n    parent: GroupModel | undefined,\n    private options: RedocNormalizedOptions,\n    isCallback: boolean = false,\n  ) {\n    makeObservable(this);\n\n    this.pointer = operationSpec.pointer;\n\n    this.description = operationSpec.description;\n    this.parent = parent;\n    this.externalDocs = operationSpec.externalDocs;\n\n    this.deprecated = !!operationSpec.deprecated;\n    this.httpVerb = operationSpec.httpVerb;\n    this.deprecated = !!operationSpec.deprecated;\n    this.operationId = operationSpec.operationId;\n    this.path = operationSpec.pathName;\n    this.isCallback = isCallback;\n    this.isWebhook = operationSpec.isWebhook;\n    this.isEvent = this.isCallback || this.isWebhook;\n\n    this.name = getOperationSummary(operationSpec);\n\n    this.sidebarLabel =\n      options.sideNavStyle === SideNavStyleEnum.IdOnly\n        ? this.operationId || this.path\n        : options.sideNavStyle === SideNavStyleEnum.PathOnly\n        ? this.path\n        : this.name;\n    this.badges =\n      operationSpec['x-badges']?.map(({ name, color, position }) => ({\n        name,\n        color: color,\n        position: position || 'after',\n      })) || [];\n\n    if (this.isCallback) {\n      // NOTE: Callbacks by default should not inherit the specification's global `security` definition.\n      // Can be defined individually per-callback in the specification. Defaults to none.\n      this.security = (operationSpec.security || []).map(\n        security => new SecurityRequirementModel(security, parser),\n      );\n\n      // TODO: update getting pathInfo for overriding servers on path level\n      this.servers = normalizeServers('', operationSpec.servers || operationSpec.pathServers || []);\n    } else {\n      this.operationHash = operationSpec.operationId && 'operation/' + operationSpec.operationId;\n      this.id =\n        operationSpec.operationId !== undefined\n          ? (parent ? parent.id + '/' : '') + this.operationHash\n          : parent !== undefined\n          ? parent.id + this.pointer\n          : this.pointer;\n\n      this.security = (operationSpec.security || parser.spec.security || []).map(\n        security => new SecurityRequirementModel(security, parser),\n      );\n\n      this.servers = normalizeServers(\n        parser.specUrl,\n        operationSpec.servers || operationSpec.pathServers || parser.spec.servers || [],\n      );\n    }\n\n    if (options.showExtensions) {\n      this.extensions = extractExtensions(operationSpec, options.showExtensions);\n    }\n  }\n\n  /**\n   * set operation as active (used by side menu)\n   */\n  @action\n  activate() {\n    this.active = true;\n  }\n\n  /**\n   * set operation as inactive (used by side menu)\n   */\n  @action\n  deactivate() {\n    this.active = false;\n  }\n\n  /**\n   * Toggle expansion in middle panel (for callbacks, which are operations)\n   */\n  @action\n  toggle() {\n    this.expanded = !this.expanded;\n  }\n\n  expand() {\n    if (this.parent) {\n      this.parent.expand();\n    }\n  }\n\n  collapse() {\n    /* do nothing */\n  }\n\n  @memoize\n  get requestBody() {\n    return (\n      this.operationSpec.requestBody &&\n      new RequestBodyModel({\n        parser: this.parser,\n        infoOrRef: this.operationSpec.requestBody,\n        options: this.options,\n        isEvent: this.isEvent,\n      })\n    );\n  }\n\n  @memoize\n  get codeSamples() {\n    const { payloadSampleIdx, hideRequestPayloadSample } = this.options;\n    let samples: Array<OpenAPIXCodeSample | XPayloadSample> =\n      this.operationSpec['x-codeSamples'] || this.operationSpec['x-code-samples'] || [];\n\n    if (this.operationSpec['x-code-samples'] && !isCodeSamplesWarningPrinted) {\n      isCodeSamplesWarningPrinted = true;\n      console.warn('\"x-code-samples\" is deprecated. Use \"x-codeSamples\" instead');\n    }\n\n    const requestBodyContent = this.requestBody && this.requestBody.content;\n    if (requestBodyContent && requestBodyContent.hasSample && !hideRequestPayloadSample) {\n      const insertInx = Math.min(samples.length, payloadSampleIdx);\n\n      samples = [\n        ...samples.slice(0, insertInx),\n        {\n          lang: 'payload',\n          label: 'Payload',\n          source: '',\n          requestBodyContent,\n        },\n        ...samples.slice(insertInx),\n      ];\n    }\n\n    return samples;\n  }\n\n  @memoize\n  get parameters() {\n    const _parameters = mergeParams(\n      this.parser,\n      this.operationSpec.pathParameters,\n      this.operationSpec.parameters,\n      // TODO: fix pointer\n    ).map(paramOrRef => new FieldModel(this.parser, paramOrRef, this.pointer, this.options));\n\n    if (this.options.sortPropsAlphabetically) {\n      return sortByField(_parameters, 'name');\n    }\n    if (this.options.sortRequiredPropsFirst) {\n      return sortByRequired(_parameters);\n    }\n\n    return _parameters;\n  }\n\n  @memoize\n  get responses() {\n    let hasSuccessResponses = false;\n    return Object.keys(this.operationSpec.responses || [])\n      .filter(code => {\n        if (code === 'default') {\n          return true;\n        }\n\n        if (getStatusCodeType(code) === 'success') {\n          hasSuccessResponses = true;\n        }\n\n        return isStatusCode(code);\n      }) // filter out other props (e.g. x-props)\n      .map(code => {\n        return new ResponseModel({\n          parser: this.parser,\n          code,\n          defaultAsError: hasSuccessResponses,\n          infoOrRef: this.operationSpec.responses[code],\n          options: this.options,\n          isEvent: this.isEvent,\n        });\n      });\n  }\n\n  @memoize\n  get callbacks() {\n    return Object.keys(this.operationSpec.callbacks || []).map(callbackEventName => {\n      return new CallbackModel(\n        this.parser,\n        callbackEventName,\n        this.operationSpec.callbacks![callbackEventName],\n        this.pointer,\n        this.options,\n      );\n    });\n  }\n}\n"
  },
  {
    "path": "src/services/models/RequestBody.ts",
    "content": "import type { OpenAPIRequestBody, Referenced } from '../../types';\n\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\nimport { MediaContentModel } from './MediaContent';\nimport { getContentWithLegacyExamples } from '../../utils';\n\ntype RequestBodyProps = {\n  parser: OpenAPIParser;\n  infoOrRef: Referenced<OpenAPIRequestBody>;\n  options: RedocNormalizedOptions;\n  isEvent: boolean;\n};\n\nexport class RequestBodyModel {\n  description: string;\n  required?: boolean;\n  content?: MediaContentModel;\n\n  constructor({ parser, infoOrRef, options, isEvent }: RequestBodyProps) {\n    const isRequest = !isEvent;\n    const { resolved: info } = parser.deref(infoOrRef);\n    this.description = info.description || '';\n    this.required = info.required;\n\n    const mediaContent = getContentWithLegacyExamples(info);\n    if (mediaContent !== undefined) {\n      this.content = new MediaContentModel(parser, mediaContent, isRequest, options);\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/models/Response.ts",
    "content": "import { action, observable, makeObservable } from 'mobx';\n\nimport type { OpenAPIResponse, Referenced } from '../../types';\n\nimport { getStatusCodeType, extractExtensions } from '../../utils';\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\nimport { FieldModel } from './Field';\nimport { MediaContentModel } from './MediaContent';\n\ntype ResponseProps = {\n  parser: OpenAPIParser;\n  code: string;\n  defaultAsError: boolean;\n  infoOrRef: Referenced<OpenAPIResponse>;\n  options: RedocNormalizedOptions;\n  isEvent: boolean;\n};\n\nexport class ResponseModel {\n  @observable\n  expanded: boolean = false;\n\n  content?: MediaContentModel;\n  code: string;\n  summary: string;\n  description: string;\n  type: string;\n  headers: FieldModel[] = [];\n  extensions: Record<string, any>;\n\n  constructor({\n    parser,\n    code,\n    defaultAsError,\n    infoOrRef,\n    options,\n    isEvent: isRequest,\n  }: ResponseProps) {\n    makeObservable(this);\n\n    this.expanded = options.expandResponses === 'all' || options.expandResponses[code];\n\n    const { resolved: info } = parser.deref(infoOrRef);\n    this.code = code;\n    if (info.content !== undefined) {\n      this.content = new MediaContentModel(parser, info.content, isRequest, options);\n    }\n\n    if (info['x-summary'] !== undefined) {\n      this.summary = info['x-summary'];\n      this.description = info.description || '';\n    } else {\n      this.summary = info.description || '';\n      this.description = '';\n    }\n\n    this.type = getStatusCodeType(code, defaultAsError);\n\n    const headers = info.headers;\n    if (headers !== undefined) {\n      this.headers = Object.keys(headers).map(name => {\n        const header = headers[name];\n        return new FieldModel(parser, { ...header, name }, '', options);\n      });\n    }\n\n    if (options.showExtensions) {\n      this.extensions = extractExtensions(info, options.showExtensions);\n    }\n  }\n\n  @action\n  toggle() {\n    this.expanded = !this.expanded;\n  }\n}\n"
  },
  {
    "path": "src/services/models/Schema.ts",
    "content": "import { action, observable, makeObservable } from 'mobx';\n\nimport type { OpenAPIExternalDocumentation, OpenAPISchema, Referenced } from '../../types';\n\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport { pushRef } from '../OpenAPIParser';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\nimport { FieldModel } from './Field';\n\nimport { MergedOpenAPISchema } from '../types';\nimport {\n  detectType,\n  extractExtensions,\n  humanizeConstraints,\n  isArray,\n  isBoolean,\n  isNamedDefinition,\n  isObject,\n  isPrimitiveType,\n  JsonPointer,\n  pluralizeType,\n  sortByField,\n  sortByRequired,\n} from '../../utils/';\n\nimport { l } from '../Labels';\n\n// TODO: refactor this model, maybe use getters instead of copying all the values\nexport class SchemaModel {\n  pointer: string;\n\n  type: string | string[];\n  displayType: string;\n  typePrefix: string = '';\n  title: string;\n  description: string;\n  externalDocs?: OpenAPIExternalDocumentation;\n\n  isPrimitive: boolean;\n  isCircular: boolean = false;\n\n  format?: string;\n  displayFormat?: string;\n  nullable: boolean;\n  deprecated: boolean;\n  pattern?: string;\n  example?: any;\n  examples?: any[];\n  enum: any[];\n  default?: any;\n  readOnly: boolean;\n  writeOnly: boolean;\n\n  constraints: string[];\n\n  fields?: FieldModel[];\n  items?: SchemaModel;\n\n  oneOf?: SchemaModel[];\n  oneOfType: string;\n  discriminatorProp: string;\n  @observable\n  activeOneOf: number = 0;\n\n  rawSchema: OpenAPISchema;\n  schema: MergedOpenAPISchema;\n  extensions?: Record<string, any>;\n  'x-enumDescriptions': { [name: string]: string };\n  const: any;\n  contentEncoding?: string;\n  contentMediaType?: string;\n  minItems?: number;\n  maxItems?: number;\n\n  /**\n   * @param isChild if schema discriminator Child\n   * When true forces dereferencing in allOfs even if circular\n   */\n  constructor(\n    parser: OpenAPIParser,\n    schemaOrRef: Referenced<OpenAPISchema>,\n    pointer: string,\n    private options: RedocNormalizedOptions,\n    isChild: boolean = false,\n    private refsStack: string[] = [],\n  ) {\n    makeObservable(this);\n\n    this.pointer = schemaOrRef.$ref || pointer || '';\n\n    const { resolved, refsStack: newRefsStack } = parser.deref(schemaOrRef, refsStack, true);\n    this.refsStack = pushRef(newRefsStack, this.pointer);\n    this.rawSchema = resolved;\n\n    this.schema = parser.mergeAllOf(this.rawSchema, this.pointer, this.refsStack);\n    this.init(parser, isChild);\n\n    if (options.showExtensions) {\n      this.extensions = extractExtensions(this.schema, options.showExtensions);\n    }\n  }\n\n  /**\n   * Set specified alternative schema as active\n   * @param idx oneOf index\n   */\n  @action\n  activateOneOf(idx: number) {\n    this.activeOneOf = idx;\n  }\n\n  hasType(type: string) {\n    return this.type === type || (isArray(this.type) && this.type.includes(type));\n  }\n\n  init(parser: OpenAPIParser, isChild: boolean) {\n    const schema = this.schema;\n    this.isCircular = !!schema['x-circular-ref'];\n\n    this.title =\n      schema.title || (isNamedDefinition(this.pointer) && JsonPointer.baseName(this.pointer)) || '';\n    this.description = schema.description || '';\n    this.type = schema.type || detectType(schema);\n    this.format = schema.format;\n    this.enum = schema.enum || [];\n    this['x-enumDescriptions'] = schema['x-enumDescriptions'];\n    this.example = schema.example;\n    this.examples = schema.examples;\n    this.deprecated = !!schema.deprecated;\n    this.pattern = schema.pattern;\n    this.externalDocs = schema.externalDocs;\n\n    this.constraints = humanizeConstraints(schema);\n    this.displayFormat = this.format;\n    this.isPrimitive = isPrimitiveType(schema, this.type);\n    this.default = schema.default;\n    this.readOnly = !!schema.readOnly;\n    this.writeOnly = !!schema.writeOnly;\n    this.const = schema.const || '';\n    this.contentEncoding = schema.contentEncoding;\n    this.contentMediaType = schema.contentMediaType;\n    this.minItems = schema.minItems;\n    this.maxItems = schema.maxItems;\n\n    if (!!schema.nullable || schema['x-nullable']) {\n      if (isArray(this.type) && !this.type.some(value => value === null || value === 'null')) {\n        this.type = [...this.type, 'null'];\n      } else if (!isArray(this.type) && (this.type !== null || this.type !== 'null')) {\n        this.type = [this.type, 'null'];\n      }\n    }\n\n    this.displayType = isArray(this.type)\n      ? this.type.map(item => (item === null ? 'null' : item)).join(' or ')\n      : this.type;\n\n    if (this.isCircular) {\n      return;\n    }\n\n    if ((schema.if && schema.then) || (schema.if && schema.else)) {\n      this.initConditionalOperators(schema, parser);\n      return;\n    }\n\n    if (!isChild && getDiscriminator(schema) !== undefined) {\n      this.initDiscriminator(schema, parser);\n      return;\n    } else if (\n      isChild &&\n      isArray(schema.oneOf) &&\n      schema.oneOf.find(s => s.$ref === this.pointer)\n    ) {\n      // we hit allOf of the schema with the parent discriminator\n      delete schema.oneOf;\n    }\n\n    if (schema.oneOf !== undefined) {\n      this.initOneOf(schema.oneOf, parser);\n      this.oneOfType = 'One of';\n      if (schema.anyOf !== undefined) {\n        console.warn(\n          `oneOf and anyOf are not supported on the same level. Skipping anyOf at ${this.pointer}`,\n        );\n      }\n      return;\n    }\n\n    if (schema.anyOf !== undefined) {\n      this.initOneOf(schema.anyOf, parser);\n      this.oneOfType = 'Any of';\n      return;\n    }\n\n    if (this.hasType('object')) {\n      this.fields = buildFields(parser, schema, this.pointer, this.options, this.refsStack);\n    } else if (this.hasType('array')) {\n      if (isArray(schema.items) || isArray(schema.prefixItems)) {\n        this.fields = buildFields(parser, schema, this.pointer, this.options, this.refsStack);\n      } else if (schema.items) {\n        this.items = new SchemaModel(\n          parser,\n          schema.items as OpenAPISchema,\n          this.pointer + '/items',\n          this.options,\n          false,\n          this.refsStack,\n        );\n      }\n\n      this.displayType =\n        schema.prefixItems || isArray(schema.items)\n          ? 'items'\n          : pluralizeType(this.items?.displayType || this.displayType);\n      this.displayFormat = this.items?.format || '';\n      this.typePrefix = this.items?.typePrefix || '' + l('arrayOf');\n      this.title = this.title || this.items?.title || '';\n      this.isPrimitive =\n        this.items?.isPrimitive !== undefined ? this.items?.isPrimitive : this.isPrimitive;\n\n      if (this.example === undefined && this.items?.example !== undefined) {\n        this.example = [this.items.example];\n      }\n      if (this.items?.isPrimitive) {\n        this.enum = this.items.enum;\n        this['x-enumDescriptions'] = this.items['x-enumDescriptions'];\n      }\n      if (isArray(this.type)) {\n        const filteredType = this.type.filter(item => item !== 'array');\n        if (filteredType.length) this.displayType += ` or ${filteredType.join(' or ')}`;\n      }\n    }\n\n    if (this.enum.length && this.options.sortEnumValuesAlphabetically) {\n      this.enum.sort();\n    }\n  }\n\n  private initOneOf(oneOf: OpenAPISchema[], parser: OpenAPIParser) {\n    this.oneOf = oneOf!.map((variant, idx) => {\n      const { resolved: derefVariant, refsStack } = parser.deref(variant, this.refsStack, true);\n\n      const merged = parser.mergeAllOf(derefVariant, this.pointer + '/oneOf/' + idx, refsStack);\n\n      // try to infer title\n      const title =\n        isNamedDefinition(variant.$ref) && !merged.title\n          ? JsonPointer.baseName(variant.$ref)\n          : `${merged.title || ''}${\n              (typeof merged.const !== 'undefined' && JSON.stringify(merged.const)) || ''\n            }`;\n      const schema = new SchemaModel(\n        parser,\n        // merge base schema into each of oneOf's subschemas\n        {\n          // variant may already have allOf so merge it to not get overwritten\n          ...merged,\n          title,\n          allOf: [{ ...this.schema, oneOf: undefined, anyOf: undefined }],\n          // if specific child schemas are listed in oneOf/anyOf, they are not supposed to be discriminated\n          discriminator: derefVariant.allOf ? undefined : merged.discriminator,\n        } as OpenAPISchema,\n        variant.$ref || this.pointer + '/oneOf/' + idx,\n        this.options,\n        false,\n        refsStack,\n      );\n\n      return schema;\n    });\n\n    if (this.options.simpleOneOfTypeLabel) {\n      const types = collectUniqueOneOfTypesDeep(this);\n      this.displayType = types.join(' or ');\n    } else {\n      this.displayType = this.oneOf\n        .map(schema => {\n          let name =\n            schema.typePrefix +\n            (schema.title ? `${schema.title} (${schema.displayType})` : schema.displayType);\n          if (name.indexOf(' or ') > -1) {\n            name = `(${name})`;\n          }\n          return name;\n        })\n        .join(' or ');\n    }\n  }\n\n  private initDiscriminator(schema: OpenAPISchema, parser: OpenAPIParser) {\n    const discriminator = getDiscriminator(schema)!;\n    this.discriminatorProp = discriminator.propertyName;\n    const implicitInversedMapping = parser.findDerived([\n      ...(this.schema['x-parentRefs'] || []),\n      this.pointer,\n    ]);\n\n    if (schema.oneOf) {\n      for (const variant of schema.oneOf) {\n        if (variant.$ref === undefined) {\n          continue;\n        }\n        const name = JsonPointer.baseName(variant.$ref);\n        implicitInversedMapping[variant.$ref] = name;\n      }\n    }\n\n    const mapping = discriminator.mapping || {};\n\n    // Defines if the mapping is exhaustive. This avoids having references\n    // that overlap with the mapping entries\n    let isLimitedToMapping = discriminator['x-explicitMappingOnly'] || false;\n    // if there are no mappings, assume non-exhaustive\n    if (Object.keys(mapping).length === 0) {\n      isLimitedToMapping = false;\n    }\n\n    const explicitInversedMapping = {};\n    for (const name in mapping) {\n      const $ref = mapping[name];\n\n      if (isArray(explicitInversedMapping[$ref])) {\n        explicitInversedMapping[$ref].push(name);\n      } else {\n        // overrides implicit mapping here\n        explicitInversedMapping[$ref] = [name];\n      }\n    }\n\n    const inversedMapping = isLimitedToMapping\n      ? { ...explicitInversedMapping }\n      : { ...implicitInversedMapping, ...explicitInversedMapping };\n\n    let refs: Array<{ $ref; name }> = [];\n\n    for (const $ref of Object.keys(inversedMapping)) {\n      const names = inversedMapping[$ref];\n      if (isArray(names)) {\n        for (const name of names) {\n          refs.push({ $ref, name });\n        }\n      } else {\n        refs.push({ $ref, name: names });\n      }\n    }\n\n    // Make the listing respects the mapping\n    // in case a mapping is defined, the user usually wants to have the order shown\n    // as it was defined in the yaml. This will sort the names given the provided\n    // mapping (if provided).\n    // The logic is:\n    // - If a name is among the mapping, promote it to first\n    // - Names among the mapping are sorted by their order in the mapping\n    // - Names outside the mapping are sorted alphabetically\n    const names = Object.keys(mapping);\n    if (names.length !== 0) {\n      refs = refs.sort((left, right) => {\n        const indexLeft = names.indexOf(left.name);\n        const indexRight = names.indexOf(right.name);\n\n        if (indexLeft < 0 && indexRight < 0) {\n          // out of mapping, order by name\n          return left.name.localeCompare(right.name);\n        } else if (indexLeft < 0) {\n          // the right is found, so mapping wins\n          return 1;\n        } else if (indexRight < 0) {\n          // left wins as it's in mapping\n          return -1;\n        } else {\n          return indexLeft - indexRight;\n        }\n      });\n    }\n\n    this.oneOf = refs.map(({ $ref, name }) => {\n      const innerSchema = new SchemaModel(\n        parser,\n        { $ref },\n        $ref,\n        this.options,\n        true,\n        this.refsStack.slice(0, -1),\n      );\n      innerSchema.title = name;\n      return innerSchema;\n    });\n  }\n\n  private initConditionalOperators(schema: OpenAPISchema, parser: OpenAPIParser) {\n    const {\n      if: ifOperator,\n      else: elseOperator = {},\n      then: thenOperator = {},\n      ...restSchema\n    } = schema;\n    const groupedOperators = [\n      {\n        allOf: [restSchema, thenOperator, ifOperator],\n        title: (ifOperator && ifOperator['x-displayName']) || ifOperator?.title || 'case 1',\n      },\n      {\n        allOf: [restSchema, elseOperator],\n        title: (elseOperator && elseOperator['x-displayName']) || elseOperator?.title || 'case 2',\n      },\n    ];\n\n    this.oneOf = groupedOperators.map(\n      (variant, idx) =>\n        new SchemaModel(\n          parser,\n          {\n            ...variant,\n          } as OpenAPISchema,\n          this.pointer + '/oneOf/' + idx,\n          this.options,\n          false,\n          this.refsStack,\n        ),\n    );\n    this.oneOfType = 'One of';\n  }\n}\n\nfunction buildFields(\n  parser: OpenAPIParser,\n  schema: OpenAPISchema,\n  $ref: string,\n  options: RedocNormalizedOptions,\n  refsStack: string[],\n): FieldModel[] {\n  const props = schema.properties || schema.prefixItems || schema.items || {};\n  const patternProps = schema.patternProperties || {};\n  const additionalProps = schema.additionalProperties || schema.unevaluatedProperties;\n  const itemsProps = schema.prefixItems ? schema.items : schema.additionalItems;\n  const defaults = schema.default;\n  let fields = Object.keys(props || []).map(fieldName => {\n    let field = props[fieldName];\n\n    if (!field) {\n      console.warn(\n        `Field \"${fieldName}\" is invalid, skipping.\\n Field must be an object but got ${typeof field} at \"${$ref}\"`,\n      );\n      field = {};\n    }\n\n    const required =\n      schema.required === undefined ? false : schema.required.indexOf(fieldName) > -1;\n\n    return new FieldModel(\n      parser,\n      {\n        name: schema.properties ? fieldName : `[${fieldName}]`,\n        required,\n        schema: {\n          ...field,\n          default: field.default === undefined && defaults ? defaults[fieldName] : field.default,\n        },\n      },\n      $ref + '/properties/' + fieldName,\n      options,\n      refsStack,\n    );\n  });\n\n  if (options.sortPropsAlphabetically) {\n    fields = sortByField(fields, 'name');\n  }\n  if (options.sortRequiredPropsFirst) {\n    // if not sort alphabetically sort in the order from required keyword\n    fields = sortByRequired(fields, !options.sortPropsAlphabetically ? schema.required : undefined);\n  }\n\n  fields.push(\n    ...Object.keys(patternProps).map(fieldName => {\n      let field = patternProps[fieldName];\n\n      if (!field) {\n        console.warn(\n          `Field \"${fieldName}\" is invalid, skipping.\\n Field must be an object but got ${typeof field} at \"${$ref}\"`,\n        );\n        field = {};\n      }\n\n      return new FieldModel(\n        parser,\n        {\n          name: fieldName,\n          required: false,\n          schema: field,\n          kind: 'patternProperties',\n        },\n        `${$ref}/patternProperties/${fieldName}`,\n        options,\n        refsStack,\n      );\n    }),\n  );\n\n  if (typeof additionalProps === 'object' || additionalProps === true) {\n    fields.push(\n      new FieldModel(\n        parser,\n        {\n          name: (typeof additionalProps === 'object'\n            ? additionalProps['x-additionalPropertiesName'] || 'property name'\n            : 'property name'\n          ).concat('*'),\n          required: false,\n          schema: additionalProps === true ? {} : additionalProps,\n          kind: 'additionalProperties',\n        },\n        $ref + '/additionalProperties',\n        options,\n        refsStack,\n      ),\n    );\n  }\n\n  fields.push(\n    ...buildAdditionalItems({\n      parser,\n      schema: itemsProps,\n      fieldsCount: fields.length,\n      $ref,\n      options,\n      refsStack,\n    }),\n  );\n\n  return fields;\n}\n\nfunction buildAdditionalItems({\n  parser,\n  schema = false,\n  fieldsCount,\n  $ref,\n  options,\n  refsStack,\n}: {\n  parser: OpenAPIParser;\n  schema?: OpenAPISchema | OpenAPISchema[] | boolean;\n  fieldsCount: number;\n  $ref: string;\n  options: RedocNormalizedOptions;\n  refsStack: string[];\n}) {\n  if (isBoolean(schema)) {\n    return schema\n      ? [\n          new FieldModel(\n            parser,\n            {\n              name: `[${fieldsCount}...]`,\n              schema: {},\n            },\n            `${$ref}/additionalItems`,\n            options,\n            refsStack,\n          ),\n        ]\n      : [];\n  }\n\n  if (isArray(schema)) {\n    return [\n      ...schema.map(\n        (field, idx) =>\n          new FieldModel(\n            parser,\n            {\n              name: `[${fieldsCount + idx}]`,\n              schema: field,\n            },\n            `${$ref}/additionalItems`,\n            options,\n            refsStack,\n          ),\n      ),\n    ];\n  }\n\n  if (isObject(schema)) {\n    return [\n      new FieldModel(\n        parser,\n        {\n          name: `[${fieldsCount}...]`,\n          schema: schema,\n        },\n        `${$ref}/additionalItems`,\n        options,\n        refsStack,\n      ),\n    ];\n  }\n\n  return [];\n}\n\nfunction getDiscriminator(schema: OpenAPISchema): OpenAPISchema['discriminator'] {\n  return schema.discriminator || schema['x-discriminator'];\n}\n\nfunction collectUniqueOneOfTypesDeep(schema: SchemaModel) {\n  const uniqueTypes = new Set();\n\n  function crawl(schema: SchemaModel) {\n    for (const oneOfType of schema.oneOf || []) {\n      if (oneOfType.oneOf) {\n        crawl(oneOfType);\n        continue;\n      }\n\n      if (oneOfType.type) {\n        uniqueTypes.add(oneOfType.type);\n      }\n    }\n  }\n\n  crawl(schema);\n  return Array.from(uniqueTypes.values());\n}\n"
  },
  {
    "path": "src/services/models/SecurityRequirement.ts",
    "content": "import type { OpenAPISecurityRequirement, OpenAPISecurityScheme } from '../../types';\nimport type { OpenAPIParser } from '../OpenAPIParser';\n\nexport interface SecurityScheme extends OpenAPISecurityScheme {\n  id: string;\n  sectionId: string;\n  displayName: string;\n  scopes: string[];\n}\n\nexport class SecurityRequirementModel {\n  schemes: SecurityScheme[];\n\n  constructor(requirement: OpenAPISecurityRequirement, parser: OpenAPIParser) {\n    const schemes = (parser.spec.components && parser.spec.components.securitySchemes) || {};\n\n    this.schemes = Object.keys(requirement || {})\n      .map(id => {\n        const { resolved: scheme } = parser.deref(schemes[id]);\n        const scopes = requirement[id] || [];\n\n        if (!scheme) {\n          console.warn(`Non existing security scheme referenced: ${id}. Skipping`);\n          return undefined;\n        }\n        const displayName = scheme['x-displayName'] || id;\n\n        return {\n          ...scheme,\n          id,\n          sectionId: id,\n          displayName,\n          scopes,\n        };\n      })\n      .filter(scheme => scheme !== undefined) as SecurityScheme[];\n  }\n}\n"
  },
  {
    "path": "src/services/models/SecuritySchemes.ts",
    "content": "import type { OpenAPISecurityScheme, Referenced } from '../../types';\nimport { SECURITY_SCHEMES_SECTION_PREFIX } from '../../utils';\nimport type { OpenAPIParser } from '../OpenAPIParser';\n\nexport class SecuritySchemeModel {\n  id: string;\n  sectionId: string;\n  type: OpenAPISecurityScheme['type'];\n  description: string;\n  displayName: string;\n  apiKey?: {\n    name: string;\n    in: OpenAPISecurityScheme['in'];\n  };\n\n  http?: {\n    scheme: string;\n    bearerFormat?: string;\n  };\n\n  flows: OpenAPISecurityScheme['flows'];\n  openId?: {\n    connectUrl: string;\n  };\n\n  constructor(parser: OpenAPIParser, id: string, scheme: Referenced<OpenAPISecurityScheme>) {\n    const { resolved: info } = parser.deref(scheme);\n    this.id = id;\n    this.sectionId = SECURITY_SCHEMES_SECTION_PREFIX + id;\n    this.type = info.type;\n    this.displayName = info['x-displayName'] || id;\n    this.description = info.description || '';\n    if (info.type === 'apiKey') {\n      this.apiKey = {\n        name: info.name!,\n        in: info.in,\n      };\n    }\n\n    if (info.type === 'http') {\n      this.http = {\n        scheme: info.scheme!,\n        bearerFormat: info.bearerFormat,\n      };\n    }\n\n    if (info.type === 'openIdConnect') {\n      this.openId = {\n        connectUrl: info.openIdConnectUrl!,\n      };\n    }\n\n    if (info.type === 'oauth2' && info.flows) {\n      this.flows = info.flows;\n    }\n  }\n}\n\nexport class SecuritySchemesModel {\n  schemes: SecuritySchemeModel[];\n\n  constructor(parser: OpenAPIParser) {\n    const schemes = (parser.spec.components && parser.spec.components.securitySchemes) || {};\n    this.schemes = Object.keys(schemes).map(\n      name => new SecuritySchemeModel(parser, name, schemes[name]),\n    );\n  }\n}\n"
  },
  {
    "path": "src/services/models/Webhook.ts",
    "content": "import type { OpenAPIPath, Referenced } from '../../types';\nimport type { OpenAPIParser } from '../OpenAPIParser';\nimport { OperationModel } from './Operation';\nimport type { RedocNormalizedOptions } from '../RedocNormalizedOptions';\nimport { isOperationName } from '../..';\n\nexport class WebhookModel {\n  operations: OperationModel[] = [];\n\n  constructor(\n    parser: OpenAPIParser,\n    options: RedocNormalizedOptions,\n    infoOrRef?: Referenced<OpenAPIPath>,\n  ) {\n    const { resolved: webhooks } = parser.deref<OpenAPIPath>(infoOrRef || {});\n    this.initWebhooks(parser, webhooks, options);\n  }\n\n  initWebhooks(parser: OpenAPIParser, webhooks: OpenAPIPath, options: RedocNormalizedOptions) {\n    for (const webhookName of Object.keys(webhooks)) {\n      const webhook = webhooks[webhookName];\n      const operations = Object.keys(webhook).filter(isOperationName);\n      for (const operationName of operations) {\n        const operationInfo = webhook[operationName];\n        if (webhook.$ref) {\n          const resolvedWebhook = parser.deref<OpenAPIPath>(webhook || {});\n          this.initWebhooks(parser, { [operationName]: resolvedWebhook }, options);\n        }\n\n        if (!operationInfo) continue;\n        const operation = new OperationModel(\n          parser,\n          {\n            ...operationInfo,\n            httpVerb: operationName,\n          },\n          undefined,\n          options,\n          false,\n        );\n\n        this.operations.push(operation);\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "src/services/models/index.ts",
    "content": "export * from '../SpecStore';\nexport * from './Group.model';\nexport * from './Operation';\nexport * from './RequestBody';\nexport * from './Example';\nexport * from './MediaContent';\nexport * from './MediaType';\nexport * from './Response';\nexport * from './Schema';\nexport * from './Field';\nexport * from './ApiInfo';\nexport * from './SecuritySchemes';\nexport * from './Callback';\n"
  },
  {
    "path": "src/services/types.ts",
    "content": "import {\n  OpenAPIOperation,\n  OpenAPIParameter,\n  OpenAPISchema,\n  OpenAPIServer,\n  OpenAPITag,\n  Referenced,\n} from '../types';\nimport { AppStore } from './AppStore';\nimport { GroupModel } from './models';\nimport { OperationModel } from './models/Operation';\nimport { RedocRawOptions } from './RedocNormalizedOptions';\n\nexport interface StoreState {\n  menu: {\n    activeItemIdx: number;\n  };\n  spec: {\n    url?: string;\n    data: any;\n  };\n  searchIndex: any;\n  options: RedocRawOptions;\n}\n\nexport interface LabelsConfig {\n  enum: string;\n  enumSingleValue: string;\n  enumArray: string;\n  default: string;\n  deprecated: string;\n  example: string;\n  examples: string;\n  recursive: string;\n  arrayOf: string;\n  webhook: string;\n  const: string;\n  noResultsFound: string;\n  download: string;\n  downloadSpecification: string;\n  responses: string;\n  callbackResponses: string;\n  requestSamples: string;\n  responseSamples: string;\n}\n\nexport type LabelsConfigRaw = Partial<LabelsConfig>;\n\nexport interface MDXComponentMeta {\n  component: React.ComponentType;\n  propsSelector: (store?: AppStore) => any;\n  props?: object;\n}\n\nexport interface MarkdownHeading {\n  id: string;\n  name: string;\n  level: number;\n  items?: MarkdownHeading[];\n  description?: string;\n}\n\nexport type ContentItemModel = GroupModel | OperationModel;\n\nexport type TagInfo = OpenAPITag & {\n  operations: ExtendedOpenAPIOperation[];\n  used?: boolean;\n};\n\nexport type ExtendedOpenAPIOperation = {\n  pointer: string;\n  pathName: string;\n  httpVerb: string;\n  pathParameters: Array<Referenced<OpenAPIParameter>>;\n  pathServers: Array<OpenAPIServer> | undefined;\n  isWebhook: boolean;\n} & OpenAPIOperation;\n\nexport type TagsInfoMap = Record<string, TagInfo>;\n\nexport interface TagGroup {\n  name: string;\n  tags: string[];\n}\n\nexport type MenuItemGroupType = 'group' | 'tag' | 'section' | 'schema';\nexport type MenuItemType = MenuItemGroupType | 'operation';\n\nexport interface IMenuItem {\n  id: string;\n  absoluteIdx?: number;\n  name: string;\n  sidebarLabel: string;\n  description?: string;\n  depth: number;\n  active: boolean;\n  expanded: boolean;\n  items: IMenuItem[];\n  parent?: IMenuItem;\n  deprecated?: boolean;\n  type: MenuItemType;\n\n  deactivate(): void;\n  activate(): void;\n\n  collapse(): void;\n  expand(): void;\n}\n\nexport interface SearchDocument {\n  title: string;\n  description: string;\n  id: string;\n}\n\nexport interface SearchResult<T = string> {\n  meta: T;\n  score: number;\n}\n\nexport enum SideNavStyleEnum {\n  SummaryOnly = 'summary-only',\n  PathOnly = 'path-only',\n  IdOnly = 'id-only',\n}\n\nexport type MergedOpenAPISchema = OpenAPISchema & {\n  'x-refsStack'?: string[];\n  'x-parentRefs'?: string[];\n  'x-circular-ref'?: boolean;\n};\n"
  },
  {
    "path": "src/setupTests.ts",
    "content": "import * as Enzyme from 'enzyme';\nimport Adapter from '@cfaester/enzyme-adapter-react-18';\nimport { TextEncoder, TextDecoder } from 'util';\n\nObject.assign(global, { TextDecoder, TextEncoder });\n\nimport 'raf/polyfill';\n\nEnzyme.configure({ adapter: new Adapter() });\n"
  },
  {
    "path": "src/standalone.tsx",
    "content": "import * as React from 'react';\nimport { createRoot, hydrateRoot } from 'react-dom/client';\nimport { configure } from 'mobx';\n\nimport { Redoc, RedocStandalone } from './components/';\nimport { AppStore } from './services/AppStore';\nimport { debugTime, debugTimeEnd } from './utils/debug';\nimport { querySelector } from './utils/dom';\nimport type { StoreState } from './services';\n\nconfigure({\n  useProxies: 'ifavailable',\n});\n\nexport { Redoc, AppStore } from '.';\n\nexport const version = __REDOC_VERSION__;\nexport const revision = __REDOC_REVISION__;\n\nfunction attributesMap(element: Element) {\n  const res = {};\n  const elAttrs = element.attributes;\n  // tslint:disable-next-line\n  for (let i = 0; i < elAttrs.length; i++) {\n    const attrib = elAttrs[i];\n    res[attrib.name] = attrib.value;\n  }\n  return res;\n}\n\nfunction parseOptionsFromElement(element: Element) {\n  const attrMap = attributesMap(element);\n  const res = {};\n  for (const attrName in attrMap) {\n    const optionName = attrName.replace(/-(.)/g, (_, $1) => $1.toUpperCase());\n    const optionValue = attrMap[attrName];\n    res[optionName] = attrName === 'theme' ? JSON.parse(optionValue) : optionValue;\n    // TODO: normalize options\n  }\n  return res;\n}\n\nexport function init(\n  specOrSpecUrl: string | any,\n  options: any = {},\n  element: Element | null = querySelector('redoc'),\n  callback?: (e?: Error) => void,\n) {\n  if (element === null) {\n    throw new Error('\"element\" argument is not provided and <redoc> tag is not found on the page');\n  }\n\n  let specUrl: string | undefined;\n  let spec: object | undefined;\n\n  if (typeof specOrSpecUrl === 'string') {\n    specUrl = specOrSpecUrl;\n  } else if (typeof specOrSpecUrl === 'object') {\n    spec = specOrSpecUrl;\n  }\n\n  const root = createRoot(element!);\n  root.render(\n    React.createElement(\n      RedocStandalone,\n      {\n        spec,\n        onLoaded: callback,\n        specUrl,\n        options: { ...options, ...parseOptionsFromElement(element) },\n      },\n      ['Loading...'],\n    ),\n  );\n}\n\nexport function destroy(element: Element | null = querySelector('redoc')): void {\n  if (element) {\n    createRoot(element).unmount();\n  }\n}\n\nexport function hydrate(\n  state: StoreState,\n  element: Element | null = querySelector('redoc'),\n  callback?: () => void,\n) {\n  debugTime('Redoc create store');\n  const store = AppStore.fromJS(state);\n  debugTimeEnd('Redoc create store');\n\n  setTimeout(() => {\n    debugTime('Redoc hydrate');\n    hydrateRoot(element!, <Redoc store={store} />, { onRecoverableError: callback });\n    debugTimeEnd('Redoc hydrate');\n  }, 0);\n}\n\n/**\n * autoinit ReDoc if <redoc> tag is found on the page with \"spec-url\" attr\n */\nfunction autoInit() {\n  const element = querySelector('redoc');\n  if (!element) {\n    return;\n  }\n  const specUrl = element.getAttribute('spec-url');\n  if (specUrl) {\n    init(specUrl, {}, element);\n  }\n}\n\nautoInit();\n"
  },
  {
    "path": "src/styled-components.ts",
    "content": "import * as styledComponents from 'styled-components';\n\nimport type { ResolvedThemeInterface } from './theme';\n\nexport type { ResolvedThemeInterface };\n\nconst {\n  default: styled,\n  css,\n  createGlobalStyle,\n  keyframes,\n  ThemeProvider,\n} = styledComponents as unknown as styledComponents.ThemedStyledComponentsModule<ResolvedThemeInterface>;\n\nexport const media = {\n  lessThan(breakpoint, print?: boolean, extra?: string) {\n    return (...args) => css`\n      @media ${print ? 'print, ' : ''} screen and (max-width: ${props =>\n          props.theme.breakpoints[breakpoint]}) ${extra || ''} {\n        ${(css as any)(...args)};\n      }\n    `;\n  },\n\n  greaterThan(breakpoint) {\n    return (...args) => css`\n      @media (min-width: ${props => props.theme.breakpoints[breakpoint]}) {\n        ${(css as any)(...args)};\n      }\n    `;\n  },\n\n  between(firstBreakpoint, secondBreakpoint) {\n    return (...args) => css`\n      @media (min-width: ${props =>\n          props.theme.breakpoints[firstBreakpoint]}) and (max-width: ${props =>\n          props.theme.breakpoints[secondBreakpoint]}) {\n        ${(css as any)(...args)};\n      }\n    `;\n  },\n};\n\nexport { css, createGlobalStyle, keyframes, ThemeProvider };\nexport default styled;\n\nexport function extensionsHook(styledName: string) {\n  return props => {\n    if (!props.theme.extensionsHook) {\n      return;\n    }\n    return props.theme.extensionsHook(styledName, props);\n  };\n}\n"
  },
  {
    "path": "src/theme.ts",
    "content": "import { darken, desaturate, lighten, readableColor, transparentize } from 'polished';\n\nconst defaultTheme: ThemeInterface = {\n  spacing: {\n    unit: 5,\n    sectionHorizontal: ({ spacing }) => spacing.unit * 8,\n    sectionVertical: ({ spacing }) => spacing.unit * 8,\n  },\n  breakpoints: {\n    small: '50rem',\n    medium: '75rem',\n    large: '105rem',\n  },\n  colors: {\n    tonalOffset: 0.2,\n    primary: {\n      main: '#32329f',\n      light: ({ colors }) => lighten(colors.tonalOffset, colors.primary.main),\n      dark: ({ colors }) => darken(colors.tonalOffset, colors.primary.main),\n      contrastText: ({ colors }) => readableColor(colors.primary.main),\n    },\n    success: {\n      main: '#1d8127',\n      light: ({ colors }) => lighten(colors.tonalOffset * 2, colors.success.main),\n      dark: ({ colors }) => darken(colors.tonalOffset, colors.success.main),\n      contrastText: ({ colors }) => readableColor(colors.success.main),\n    },\n    warning: {\n      main: '#ffa500',\n      light: ({ colors }) => lighten(colors.tonalOffset, colors.warning.main),\n      dark: ({ colors }) => darken(colors.tonalOffset, colors.warning.main),\n      contrastText: '#ffffff',\n    },\n    error: {\n      main: '#d41f1c',\n      light: ({ colors }) => lighten(colors.tonalOffset, colors.error.main),\n      dark: ({ colors }) => darken(colors.tonalOffset, colors.error.main),\n      contrastText: ({ colors }) => readableColor(colors.error.main),\n    },\n    gray: {\n      50: '#FAFAFA',\n      100: '#F5F5F5',\n    },\n    text: {\n      primary: '#333333',\n      secondary: ({ colors }) => lighten(colors.tonalOffset, colors.text.primary),\n    },\n    border: {\n      dark: 'rgba(0,0,0, 0.1)',\n      light: '#ffffff',\n    },\n    responses: {\n      success: {\n        color: ({ colors }) => colors.success.main,\n        backgroundColor: ({ colors }) => transparentize(0.93, colors.success.main),\n        tabTextColor: ({ colors }) => colors.responses.success.color,\n      },\n      error: {\n        color: ({ colors }) => colors.error.main,\n        backgroundColor: ({ colors }) => transparentize(0.93, colors.error.main),\n        tabTextColor: ({ colors }) => colors.responses.error.color,\n      },\n      redirect: {\n        color: ({ colors }) => colors.warning.main,\n        backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.redirect.color),\n        tabTextColor: ({ colors }) => colors.responses.redirect.color,\n      },\n      info: {\n        color: '#87ceeb',\n        backgroundColor: ({ colors }) => transparentize(0.9, colors.responses.info.color),\n        tabTextColor: ({ colors }) => colors.responses.info.color,\n      },\n    },\n    http: {\n      get: '#2F8132',\n      post: '#186FAF',\n      put: '#95507c',\n      options: '#947014',\n      patch: '#bf581d',\n      delete: '#cc3333',\n      basic: '#707070',\n      link: '#07818F',\n      head: '#A23DAD',\n    },\n  },\n  schema: {\n    linesColor: theme =>\n      lighten(\n        theme.colors.tonalOffset,\n        desaturate(theme.colors.tonalOffset, theme.colors.primary.main),\n      ),\n    defaultDetailsWidth: '75%',\n    typeNameColor: theme => theme.colors.text.secondary,\n    typeTitleColor: theme => theme.schema.typeNameColor,\n    requireLabelColor: theme => theme.colors.error.main,\n    labelsTextSize: '0.9em',\n    nestingSpacing: '1em',\n    nestedBackground: '#fafafa',\n    arrow: {\n      size: '1.1em',\n      color: theme => theme.colors.text.secondary,\n    },\n  },\n  typography: {\n    fontSize: '14px',\n    lineHeight: '1.5em',\n    fontWeightRegular: '400',\n    fontWeightBold: '600',\n    fontWeightLight: '300',\n    fontFamily: 'Roboto, sans-serif',\n    smoothing: 'antialiased',\n    optimizeSpeed: true,\n    headings: {\n      fontFamily: 'Montserrat, sans-serif',\n      fontWeight: '400',\n      lineHeight: '1.6em',\n    },\n    code: {\n      fontSize: '13px',\n      fontFamily: 'Courier, monospace',\n      lineHeight: ({ typography }) => typography.lineHeight,\n      fontWeight: ({ typography }) => typography.fontWeightRegular,\n      color: '#e53935',\n      backgroundColor: 'rgba(38, 50, 56, 0.05)',\n      wrap: false,\n    },\n    links: {\n      color: ({ colors }) => colors.primary.main,\n      visited: ({ typography }) => typography.links.color,\n      hover: ({ typography }) => lighten(0.2, typography.links.color),\n      textDecoration: 'auto',\n      hoverTextDecoration: 'auto',\n    },\n  },\n  sidebar: {\n    width: '260px',\n    backgroundColor: '#fafafa',\n    textColor: '#333333',\n    activeTextColor: theme =>\n      theme.sidebar.textColor !== defaultTheme.sidebar!.textColor\n        ? theme.sidebar.textColor\n        : theme.colors.primary.main,\n    groupItems: {\n      activeBackgroundColor: theme => darken(0.1, theme.sidebar.backgroundColor),\n      activeTextColor: theme => theme.sidebar.activeTextColor,\n      textTransform: 'uppercase',\n    },\n    level1Items: {\n      activeBackgroundColor: theme => darken(0.05, theme.sidebar.backgroundColor),\n      activeTextColor: theme => theme.sidebar.activeTextColor,\n      textTransform: 'none',\n    },\n    arrow: {\n      size: '1.5em',\n      color: theme => theme.sidebar.textColor,\n    },\n  },\n  logo: {\n    maxHeight: ({ sidebar }) => sidebar.width,\n    maxWidth: ({ sidebar }) => sidebar.width,\n    gutter: '2px',\n  },\n  rightPanel: {\n    backgroundColor: '#263238',\n    width: '40%',\n    textColor: '#ffffff',\n    servers: {\n      overlay: {\n        backgroundColor: '#fafafa',\n        textColor: '#263238',\n      },\n      url: {\n        backgroundColor: '#fff',\n      },\n    },\n  },\n  codeBlock: {\n    backgroundColor: ({ rightPanel }) => darken(0.1, rightPanel.backgroundColor),\n  },\n  fab: {\n    backgroundColor: '#f2f2f2',\n    color: '#0065FB',\n  },\n};\n\nexport default defaultTheme;\n\nexport function resolveTheme(theme: ThemeInterface): ResolvedThemeInterface {\n  const resolvedValues = {};\n  let counter = 0;\n  const setProxy = (obj, path: string) => {\n    Object.keys(obj).forEach(k => {\n      const currentPath = (path ? path + '.' : '') + k;\n      const val = obj[k];\n      if (typeof val === 'function') {\n        Object.defineProperty(obj, k, {\n          get() {\n            if (!resolvedValues[currentPath]) {\n              counter++;\n              if (counter > 1000) {\n                throw new Error(\n                  `Theme probably contains circular dependency at ${currentPath}: ${val.toString()}`,\n                );\n              }\n\n              resolvedValues[currentPath] = val(theme);\n            }\n            return resolvedValues[currentPath];\n          },\n          enumerable: true,\n        });\n      } else if (typeof val === 'object') {\n        setProxy(val, currentPath);\n      }\n    });\n  };\n\n  setProxy(theme, '');\n  return JSON.parse(JSON.stringify(theme));\n}\n\nexport interface ColorSetting {\n  main: string;\n  light: string;\n  dark: string;\n  contrastText: string;\n}\n\nexport interface HTTPResponseColos {\n  color: string;\n  backgroundColor: string;\n  tabTextColor: string;\n}\n\nexport interface FontSettings {\n  fontSize: string;\n  fontWeight: string;\n  fontFamily: string;\n  lineHeight: string;\n  color: string;\n}\n\nexport interface Servers {\n  overlay: {\n    backgroundColor: string;\n    textColor: string;\n  };\n  url: {\n    backgroundColor: string;\n  };\n}\n\nexport interface ResolvedThemeInterface {\n  spacing: {\n    unit: number;\n    sectionHorizontal: number;\n    sectionVertical: number;\n  };\n  breakpoints: {\n    small: string;\n    medium: string;\n    large: string;\n  };\n  colors: {\n    tonalOffset: number;\n    primary: ColorSetting;\n    success: ColorSetting;\n    warning: ColorSetting;\n    error: ColorSetting;\n    gray: {\n      50: string;\n      100: string;\n    };\n    border: {\n      light: string;\n      dark: string;\n    };\n    text: {\n      primary: string;\n      secondary: string;\n    };\n    responses: {\n      success: HTTPResponseColos;\n      error: HTTPResponseColos;\n      redirect: HTTPResponseColos;\n      info: HTTPResponseColos;\n    };\n    http: {\n      get: string;\n      post: string;\n      put: string;\n      options: string;\n      patch: string;\n      delete: string;\n      basic: string;\n      link: string;\n      head: string;\n    };\n  };\n  schema: {\n    linesColor: string;\n    defaultDetailsWidth: string;\n    typeNameColor: string;\n    typeTitleColor: string;\n    requireLabelColor: string;\n    labelsTextSize: string;\n    nestingSpacing: string;\n    nestedBackground: string;\n    arrow: {\n      size: string;\n      color: string;\n    };\n  };\n  typography: {\n    fontSize: string;\n    lineHeight: string;\n    fontWeightLight: string;\n    fontWeightRegular: string;\n    fontWeightBold: string;\n    fontFamily: string;\n\n    smoothing: string;\n    optimizeSpeed: boolean;\n\n    code: FontSettings & {\n      backgroundColor: string;\n      wrap: boolean;\n    };\n    headings: {\n      fontFamily: string;\n      fontWeight: string;\n      lineHeight: string;\n    };\n\n    links: {\n      color: string;\n      visited: string;\n      hover: string;\n      textDecoration: string;\n      hoverTextDecoration: string;\n    };\n  };\n  sidebar: {\n    width: string;\n    backgroundColor: string;\n    textColor: string;\n    activeTextColor: string;\n    groupItems: {\n      activeBackgroundColor: string;\n      activeTextColor: string;\n      textTransform: string;\n    };\n    level1Items: {\n      activeBackgroundColor: string;\n      activeTextColor: string;\n      textTransform: string;\n    };\n    arrow: {\n      size: string;\n      color: string;\n    };\n  };\n  logo: {\n    maxHeight: string;\n    maxWidth: string;\n    gutter: string;\n  };\n  rightPanel: {\n    backgroundColor: string;\n    textColor: string;\n    width: string;\n    servers: Servers;\n  };\n  codeBlock: {\n    backgroundColor: string;\n  };\n  fab: {\n    backgroundColor: string;\n    color: string;\n  };\n\n  extensionsHook?: (name: string, props: any) => string;\n}\n\nexport type primitive = string | number | boolean | undefined | null;\nexport type AdvancedThemeDeep<T> = T extends primitive\n  ? T | ((theme: ResolvedThemeInterface) => T)\n  : AdvancedThemeObject<T>;\nexport type AdvancedThemeObject<T> = { [P in keyof T]?: AdvancedThemeDeep<T[P]> };\nexport type ThemeInterface = AdvancedThemeObject<ResolvedThemeInterface>;\n"
  },
  {
    "path": "src/types/index.ts",
    "content": "export * from './open-api';\n\nexport type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;\n"
  },
  {
    "path": "src/types/open-api.ts",
    "content": "import type { Omit } from './index';\n\nexport interface OpenAPISpec {\n  openapi: string;\n  info: OpenAPIInfo;\n  servers?: OpenAPIServer[];\n  paths: OpenAPIPaths;\n  components?: OpenAPIComponents;\n  security?: OpenAPISecurityRequirement[];\n  tags?: OpenAPITag[];\n  externalDocs?: OpenAPIExternalDocumentation;\n  'x-webhooks'?: OpenAPIPaths;\n  webhooks?: OpenAPIPaths;\n}\n\nexport interface OpenAPIInfo {\n  title: string;\n  version: string;\n\n  description?: string;\n  summary?: string;\n  termsOfService?: string;\n  contact?: OpenAPIContact;\n  license?: OpenAPILicense;\n}\n\nexport interface OpenAPIServer {\n  url: string;\n  description?: string;\n  variables?: { [name: string]: OpenAPIServerVariable };\n}\n\nexport interface OpenAPIServerVariable {\n  enum?: string[];\n  default: string;\n  description?: string;\n}\n\nexport interface OpenAPIPaths {\n  [path: string]: OpenAPIPath;\n}\nexport interface OpenAPIRef {\n  'x-refsStack'?: string[];\n  $ref: string;\n  summary?: string;\n  description?: string;\n}\n\nexport type Referenced<T> = OpenAPIRef | T;\n\nexport interface OpenAPIPath {\n  summary?: string;\n  description?: string;\n  get?: OpenAPIOperation;\n  put?: OpenAPIOperation;\n  post?: OpenAPIOperation;\n  delete?: OpenAPIOperation;\n  options?: OpenAPIOperation;\n  head?: OpenAPIOperation;\n  patch?: OpenAPIOperation;\n  trace?: OpenAPIOperation;\n  servers?: OpenAPIServer[];\n  parameters?: Array<Referenced<OpenAPIParameter>>;\n  $ref?: string;\n}\n\nexport interface OpenAPIXCodeSample {\n  lang: string;\n  label?: string;\n  source: string;\n}\n\nexport interface OpenAPIXBadges {\n  name: string;\n  color?: string;\n  position?: 'before' | 'after';\n}\n\nexport interface OpenAPIOperation {\n  tags?: string[];\n  summary?: string;\n  description?: string;\n  externalDocs?: OpenAPIExternalDocumentation;\n  operationId?: string;\n  parameters?: Array<Referenced<OpenAPIParameter>>;\n  requestBody?: Referenced<OpenAPIRequestBody>;\n  responses: OpenAPIResponses;\n  callbacks?: { [name: string]: Referenced<OpenAPICallback> };\n  deprecated?: boolean;\n  security?: OpenAPISecurityRequirement[];\n  servers?: OpenAPIServer[];\n  'x-codeSamples'?: OpenAPIXCodeSample[];\n  'x-code-samples'?: OpenAPIXCodeSample[]; // deprecated\n  'x-badges'?: OpenAPIXBadges[];\n}\n\nexport interface OpenAPIParameter {\n  name: string;\n  in?: OpenAPIParameterLocation;\n  description?: string;\n  required?: boolean;\n  deprecated?: boolean;\n  allowEmptyValue?: boolean;\n  style?: OpenAPIParameterStyle;\n  explode?: boolean;\n  allowReserved?: boolean;\n  schema?: Referenced<OpenAPISchema>;\n  example?: any;\n  examples?: { [media: string]: Referenced<OpenAPIExample> };\n  content?: { [media: string]: OpenAPIMediaType };\n  encoding?: Record<string, OpenAPIEncoding>;\n  const?: any;\n}\n\nexport interface OpenAPIExample {\n  value: any;\n  summary?: string;\n  description?: string;\n  externalValue?: string;\n}\n\nexport interface OpenAPISchema {\n  $ref?: string;\n  type?: string | string[];\n  properties?: { [name: string]: OpenAPISchema };\n  patternProperties?: { [name: string]: OpenAPISchema };\n  additionalProperties?: boolean | OpenAPISchema;\n  unevaluatedProperties?: boolean | OpenAPISchema;\n  description?: string;\n  default?: any;\n  items?: OpenAPISchema | OpenAPISchema[] | boolean;\n  required?: string[];\n  readOnly?: boolean;\n  writeOnly?: boolean;\n  deprecated?: boolean;\n  format?: string;\n  externalDocs?: OpenAPIExternalDocumentation;\n  discriminator?: OpenAPIDiscriminator;\n  nullable?: boolean;\n  oneOf?: OpenAPISchema[];\n  anyOf?: OpenAPISchema[];\n  allOf?: OpenAPISchema[];\n  not?: OpenAPISchema;\n\n  title?: string;\n  multipleOf?: number;\n  maximum?: number;\n  exclusiveMaximum?: boolean | number;\n  minimum?: number;\n  exclusiveMinimum?: boolean | number;\n  maxLength?: number;\n  minLength?: number;\n  pattern?: string;\n  maxItems?: number;\n  minItems?: number;\n  uniqueItems?: boolean;\n  maxProperties?: number;\n  minProperties?: number;\n  enum?: any[];\n  example?: any;\n\n  if?: OpenAPISchema;\n  else?: OpenAPISchema;\n  then?: OpenAPISchema;\n  examples?: any[];\n  const?: string;\n  contentEncoding?: string;\n  contentMediaType?: string;\n  prefixItems?: OpenAPISchema[];\n  additionalItems?: OpenAPISchema | boolean;\n}\n\nexport interface OpenAPIDiscriminator {\n  propertyName: string;\n  mapping?: { [name: string]: string };\n  'x-explicitMappingOnly'?: boolean;\n}\n\nexport interface OpenAPIMediaType {\n  schema?: Referenced<OpenAPISchema>;\n  example?: any;\n  examples?: { [name: string]: Referenced<OpenAPIExample> };\n  encoding?: { [field: string]: OpenAPIEncoding };\n}\n\nexport interface OpenAPIEncoding {\n  contentType: string;\n  headers?: { [name: string]: Referenced<OpenAPIHeader> };\n  style: OpenAPIParameterStyle;\n  explode: boolean;\n  allowReserved: boolean;\n}\n\nexport type OpenAPIParameterLocation = 'query' | 'header' | 'path' | 'cookie';\nexport type OpenAPIParameterStyle =\n  | 'matrix'\n  | 'label'\n  | 'form'\n  | 'simple'\n  | 'spaceDelimited'\n  | 'pipeDelimited'\n  | 'deepObject';\n\nexport interface OpenAPIRequestBody {\n  description?: string;\n  required?: boolean;\n  content: { [mime: string]: OpenAPIMediaType };\n\n  'x-examples'?: { [mime: string]: { [name: string]: Referenced<OpenAPIExample> } };\n  'x-example'?: { [mime: string]: any };\n}\n\nexport interface OpenAPIResponses {\n  [code: string]: Referenced<OpenAPIResponse>;\n}\n\nexport interface OpenAPIResponse\n  extends Pick<OpenAPIRequestBody, 'description' | 'x-examples' | 'x-example'> {\n  headers?: { [name: string]: Referenced<OpenAPIHeader> };\n  links?: { [name: string]: Referenced<OpenAPILink> };\n  content?: { [mime: string]: OpenAPIMediaType };\n}\n\nexport interface OpenAPILink {\n  $ref?: string;\n}\n\nexport type OpenAPIHeader = Omit<OpenAPIParameter, 'in' | 'name'>;\n\nexport interface OpenAPICallback {\n  [name: string]: OpenAPIPath;\n}\n\nexport interface OpenAPIComponents {\n  schemas?: { [name: string]: Referenced<OpenAPISchema> };\n  responses?: { [name: string]: Referenced<OpenAPIResponse> };\n  parameters?: { [name: string]: Referenced<OpenAPIParameter> };\n  examples?: { [name: string]: Referenced<OpenAPIExample> };\n  requestBodies?: { [name: string]: Referenced<OpenAPIRequestBody> };\n  headers?: { [name: string]: Referenced<OpenAPIHeader> };\n  securitySchemes?: { [name: string]: Referenced<OpenAPISecurityScheme> };\n  links?: { [name: string]: Referenced<OpenAPILink> };\n  callbacks?: { [name: string]: Referenced<OpenAPICallback> };\n}\n\nexport interface OpenAPISecurityRequirement {\n  [name: string]: string[];\n}\n\nexport interface OpenAPISecurityScheme {\n  type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';\n  description?: string;\n  name?: string;\n  in?: 'query' | 'header' | 'cookie';\n  scheme?: string;\n  bearerFormat: string;\n  flows: {\n    implicit?: {\n      refreshUrl?: string;\n      scopes: Record<string, string>;\n      authorizationUrl: string;\n    };\n    password?: {\n      refreshUrl?: string;\n      scopes: Record<string, string>;\n      tokenUrl: string;\n    };\n    clientCredentials?: {\n      refreshUrl?: string;\n      scopes: Record<string, string>;\n      tokenUrl: string;\n    };\n    authorizationCode?: {\n      refreshUrl?: string;\n      scopes: Record<string, string>;\n      tokenUrl: string;\n    };\n  };\n  openIdConnectUrl?: string;\n}\n\nexport interface OpenAPITag {\n  name: string;\n  description?: string;\n  externalDocs?: OpenAPIExternalDocumentation;\n  'x-displayName'?: string;\n}\n\nexport interface OpenAPIExternalDocumentation {\n  description?: string;\n  url: string;\n}\n\nexport interface OpenAPIContact {\n  name?: string;\n  url?: string;\n  email?: string;\n}\n\nexport interface OpenAPILicense {\n  name: string;\n  url?: string;\n  identifier?: string;\n}\n"
  },
  {
    "path": "src/utils/JsonPointer.ts",
    "content": "'use strict';\nimport * as JsonPointerLib from 'json-pointer';\n\nconst origParse = JsonPointerLib.parse;\n/**\n * Wrapper for JsonPointer. Provides common operations\n */\n\nexport class JsonPointer {\n  /**\n   * returns last JsonPointer token\n   * if level > 1 returns levels last (second last/third last)\n   * @example\n   * // returns subpath\n   * JsonPointerHelper.baseName('/path/0/subpath')\n   * // returns foo\n   * JsonPointerHelper.baseName('/path/foo/subpath', 2)\n   */\n  static baseName(pointer, level = 1) {\n    const tokens = JsonPointer.parse(pointer);\n    return tokens[tokens.length - level];\n  }\n\n  /**\n   * returns dirname of pointer\n   * if level > 1 returns corresponding dirname in the hierarchy\n   * @example\n   * // returns /path/0\n   * JsonPointerHelper.dirName('/path/0/subpath')\n   * // returns /path\n   * JsonPointerHelper.dirName('/path/foo/subpath', 2)\n   */\n  static dirName(pointer, level = 1) {\n    const tokens = JsonPointer.parse(pointer);\n    return JsonPointerLib.compile(tokens.slice(0, tokens.length - level));\n  }\n\n  /**\n   * returns relative path tokens\n   * @example\n   * // returns ['subpath']\n   * JsonPointerHelper.relative('/path/0', '/path/0/subpath')\n   * // returns ['foo', 'subpath']\n   * JsonPointerHelper.relative('/path', '/path/foo/subpath')\n   */\n  static relative(from, to): string[] {\n    const fromTokens = JsonPointer.parse(from);\n    const toTokens = JsonPointer.parse(to);\n    return toTokens.slice(fromTokens.length);\n  }\n\n  /**\n   * overridden JsonPointer original parse to take care of prefixing '#' symbol\n   * that is not valid JsonPointer\n   */\n  static parse(pointer) {\n    let ptr = pointer;\n    if (ptr.charAt(0) === '#') {\n      ptr = ptr.substring(1);\n    }\n    return origParse(ptr);\n  }\n\n  /**\n   * Creates a JSON pointer path, by joining one or more tokens to a base path.\n   *\n   * @param {string} base - The base path\n   * @param {string|string[]} tokens - The token(s) to append (e.g. [\"name\", \"first\"])\n   * @returns {string}\n   */\n  static join(base, tokens) {\n    // TODO: optimize\n    const baseTokens = JsonPointer.parse(base);\n    const resTokens = baseTokens.concat(tokens);\n    return JsonPointerLib.compile(resTokens);\n  }\n\n  static get(object: object, pointer: string) {\n    return JsonPointerLib.get(object, pointer);\n  }\n\n  static compile(tokens: string[]) {\n    return JsonPointerLib.compile(tokens);\n  }\n\n  static escape(pointer: string) {\n    return JsonPointerLib.escape(pointer);\n  }\n}\n(JsonPointerLib as any).parse = JsonPointer.parse;\nObject.assign(JsonPointer, JsonPointerLib);\nexport default JsonPointer;\n"
  },
  {
    "path": "src/utils/__tests__/__snapshots__/loadAndBundleSpec.test.ts.snap",
    "content": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`#loadAndBundleSpec should load And Bundle Spec demo/openapi.yaml 1`] = `\n{\n  \"components\": {\n    \"examples\": {\n      \"Order\": {\n        \"value\": {\n          \"complete\": false,\n          \"quantity\": 1,\n          \"shipDate\": \"2018-10-19T16:46:45Z\",\n          \"status\": \"placed\",\n        },\n      },\n    },\n    \"requestBodies\": {\n      \"Pet\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"allOf\": [\n                {\n                  \"description\": \"My Pet\",\n                  \"title\": \"Pettie\",\n                },\n                {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n              ],\n            },\n          },\n          \"application/xml\": {\n            \"schema\": {\n              \"properties\": {\n                \"name\": {\n                  \"default\": [],\n                  \"description\": \"hooray\",\n                  \"type\": \"string\",\n                },\n              },\n              \"type\": \"object\",\n            },\n          },\n        },\n        \"description\": \"Pet object that needs to be added to the store\",\n        \"required\": true,\n      },\n      \"UserArray\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"items\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n              \"type\": \"array\",\n            },\n          },\n        },\n        \"description\": \"List of user object\",\n        \"required\": true,\n      },\n    },\n    \"schemas\": {\n      \"ApiResponse\": {\n        \"properties\": {\n          \"code\": {\n            \"format\": \"int32\",\n            \"type\": \"integer\",\n          },\n          \"message\": {\n            \"type\": \"string\",\n          },\n          \"type\": {\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n      },\n      \"Cat\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"huntingSkill\": {\n                \"default\": \"lazy\",\n                \"description\": \"The measured skill for hunting\",\n                \"enum\": [\n                  \"clueless\",\n                  \"lazy\",\n                  \"adventurous\",\n                  \"aggressive\",\n                ],\n                \"example\": \"adventurous\",\n                \"type\": \"string\",\n              },\n            },\n            \"required\": [\n              \"huntingSkill\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a cat\",\n        \"x-tags\": [\n          \"pet\",\n        ],\n      },\n      \"Category\": {\n        \"properties\": {\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Category ID\",\n          },\n          \"name\": {\n            \"description\": \"Category name\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"sub\": {\n            \"description\": \"Test Sub Category\",\n            \"properties\": {\n              \"prop1\": {\n                \"description\": \"Dumb Property\",\n                \"type\": \"string\",\n              },\n            },\n            \"type\": \"object\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Category\",\n        },\n      },\n      \"Dog\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"packSize\": {\n                \"default\": 1,\n                \"description\": \"The size of the pack the dog is from\",\n                \"format\": \"int32\",\n                \"minimum\": 1,\n                \"type\": \"integer\",\n              },\n            },\n            \"required\": [\n              \"packSize\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a dog\",\n      },\n      \"HoneyBee\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"honeyPerDay\": {\n                \"description\": \"Average amount of honey produced per day in ounces\",\n                \"example\": 3.14,\n                \"multipleOf\": 0.01,\n                \"type\": \"number\",\n              },\n            },\n            \"required\": [\n              \"honeyPerDay\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a honey bee\",\n      },\n      \"Id\": {\n        \"format\": \"int64\",\n        \"readOnly\": true,\n        \"type\": \"integer\",\n      },\n      \"Order\": {\n        \"properties\": {\n          \"complete\": {\n            \"default\": false,\n            \"description\": \"Indicates whenever order was completed or not\",\n            \"readOnly\": true,\n            \"type\": \"boolean\",\n          },\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Order ID\",\n          },\n          \"petId\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Pet ID\",\n          },\n          \"quantity\": {\n            \"default\": 1,\n            \"format\": \"int32\",\n            \"minimum\": 1,\n            \"type\": \"integer\",\n          },\n          \"requestId\": {\n            \"description\": \"Unique Request Id\",\n            \"type\": \"string\",\n            \"writeOnly\": true,\n          },\n          \"shipDate\": {\n            \"description\": \"Estimated ship date\",\n            \"format\": \"date-time\",\n            \"type\": \"string\",\n          },\n          \"status\": {\n            \"description\": \"Order Status\",\n            \"enum\": [\n              \"placed\",\n              \"approved\",\n              \"delivered\",\n            ],\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Order\",\n        },\n      },\n      \"Pet\": {\n        \"discriminator\": {\n          \"mapping\": {\n            \"bee\": \"#/components/schemas/HoneyBee\",\n            \"cat\": \"#/components/schemas/Cat\",\n            \"dog\": \"#/components/schemas/Dog\",\n          },\n          \"propertyName\": \"petType\",\n        },\n        \"properties\": {\n          \"category\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Category\",\n              },\n            ],\n            \"description\": \"Categories this pet belongs to\",\n          },\n          \"friend\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Pet\",\n              },\n            ],\n          },\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Pet ID\",\n            \"externalDocs\": {\n              \"description\": \"Find more info here\",\n              \"url\": \"https://example.com\",\n            },\n          },\n          \"name\": {\n            \"description\": \"The name given to a pet\",\n            \"example\": \"Guru\",\n            \"type\": \"string\",\n          },\n          \"petType\": {\n            \"description\": \"Type of a pet\",\n            \"type\": \"string\",\n          },\n          \"photoUrls\": {\n            \"default\": [],\n            \"description\": \"The list of URL to a cute photos featuring pet\",\n            \"items\": {\n              \"format\": \"url\",\n              \"type\": \"string\",\n            },\n            \"maxItems\": 20,\n            \"type\": \"array\",\n            \"xml\": {\n              \"name\": \"photoUrl\",\n              \"wrapped\": true,\n            },\n          },\n          \"status\": {\n            \"description\": \"Pet status in the store\",\n            \"enum\": [\n              \"available\",\n              \"pending\",\n              \"sold\",\n            ],\n            \"type\": \"string\",\n            \"x-enumDescriptions\": {\n              \"available\": \"Available status\",\n              \"pending\": \"Pending status\",\n              \"sold\": \"Sold status\",\n            },\n          },\n          \"tags\": {\n            \"description\": \"Tags attached to the pet\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Tag\",\n            },\n            \"minItems\": 1,\n            \"type\": \"array\",\n            \"xml\": {\n              \"name\": \"tag\",\n              \"wrapped\": true,\n            },\n          },\n        },\n        \"required\": [\n          \"name\",\n          \"photoUrls\",\n        ],\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Pet\",\n        },\n      },\n      \"Tag\": {\n        \"properties\": {\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Tag ID\",\n          },\n          \"name\": {\n            \"description\": \"Tag name\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Tag\",\n        },\n      },\n      \"User\": {\n        \"properties\": {\n          \"addresses\": {\n            \"additionalItems\": {\n              \"type\": \"string\",\n            },\n            \"items\": [\n              {\n                \"properties\": {\n                  \"city\": {\n                    \"minLength\": 0,\n                    \"type\": \"string\",\n                  },\n                  \"country\": {\n                    \"minLength\": 0,\n                    \"type\": \"string\",\n                  },\n                  \"street\": {\n                    \"description\": \"includes build/apartment number\",\n                    \"minLength\": 0,\n                    \"type\": \"string\",\n                  },\n                },\n                \"type\": \"object\",\n              },\n              {\n                \"type\": \"number\",\n              },\n            ],\n            \"maxLength\": 10,\n            \"minItems\": 0,\n            \"type\": \"array\",\n          },\n          \"email\": {\n            \"description\": \"User email address\",\n            \"example\": \"john.smith@example.com\",\n            \"format\": \"email\",\n            \"type\": \"string\",\n          },\n          \"firstName\": {\n            \"description\": \"User first name\",\n            \"example\": \"John\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"id\": {\n            \"$ref\": \"#/components/schemas/Id\",\n          },\n          \"lastName\": {\n            \"description\": \"User last name\",\n            \"example\": \"Smith\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"password\": {\n            \"description\": \"User password, MUST contain a mix of upper and lower case letters, as well as digits\",\n            \"example\": \"drowssaP123\",\n            \"format\": \"password\",\n            \"minLength\": 8,\n            \"pattern\": \"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/\",\n            \"type\": \"string\",\n          },\n          \"pet\": {\n            \"oneOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Pet\",\n              },\n              {\n                \"$ref\": \"#/components/schemas/Tag\",\n              },\n            ],\n          },\n          \"phone\": {\n            \"description\": \"User phone number in international format\",\n            \"example\": \"+1-202-555-0192\",\n            \"pattern\": \"/^\\\\+(?:[0-9]-?){6,14}[0-9]$/\",\n            \"type\": \"string\",\n          },\n          \"userStatus\": {\n            \"description\": \"User status\",\n            \"format\": \"int32\",\n            \"type\": \"integer\",\n          },\n          \"username\": {\n            \"description\": \"User supplied username\",\n            \"example\": \"John78\",\n            \"minLength\": 4,\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"User\",\n        },\n      },\n    },\n    \"securitySchemes\": {\n      \"api_key\": {\n        \"description\": \"For this sample, you can use the api key \\`special-key\\` to test the authorization filters.\n\",\n        \"in\": \"header\",\n        \"name\": \"api_key\",\n        \"type\": \"apiKey\",\n      },\n      \"petstore_auth\": {\n        \"description\": \"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n\",\n        \"flows\": {\n          \"implicit\": {\n            \"authorizationUrl\": \"http://petstore.swagger.io/api/oauth/dialog\",\n            \"scopes\": {\n              \"read:pets\": \"read your pets\",\n              \"write:pets\": \"modify pets in your account\",\n            },\n          },\n        },\n        \"type\": \"oauth2\",\n      },\n    },\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out how to create Github repo for your OpenAPI spec.\",\n    \"url\": \"https://github.com/Rebilly/generator-openapi-repo\",\n  },\n  \"info\": {\n    \"contact\": {\n      \"email\": \"apiteam@swagger.io\",\n      \"name\": \"API Support\",\n      \"url\": \"https://github.com/Redocly/redoc\",\n    },\n    \"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/main/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/main/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<!-- ReDoc-Inject: <security-definitions> -->\n\",\n    \"license\": {\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\",\n    },\n    \"termsOfService\": \"http://swagger.io/terms/\",\n    \"title\": \"Swagger Petstore\",\n    \"version\": \"1.0.0\",\n    \"x-logo\": {\n      \"altText\": \"Petstore logo\",\n      \"url\": \"https://redocly.github.io/redoc/petstore-logo.png\",\n    },\n  },\n  \"openapi\": \"3.0.0\",\n  \"paths\": {\n    \"/pet\": {\n      \"parameters\": [\n        {\n          \"description\": \"The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US\",\n          \"example\": \"en-US\",\n          \"in\": \"header\",\n          \"name\": \"Accept-Language\",\n          \"required\": false,\n          \"schema\": {\n            \"default\": \"en-AU\",\n            \"type\": \"string\",\n          },\n        },\n        {\n          \"description\": \"Some cookie\",\n          \"in\": \"cookie\",\n          \"name\": \"cookieParam\",\n          \"required\": true,\n          \"schema\": {\n            \"format\": \"int64\",\n            \"type\": \"integer\",\n          },\n        },\n      ],\n      \"post\": {\n        \"description\": \"Add new pet to the store inventory.\",\n        \"operationId\": \"addPet\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Pet\",\n        },\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"tags\": [\n          \"pet\",\n        ],\n        \"x-badges\": [\n          {\n            \"color\": \"purple\",\n            \"name\": \"Beta\",\n            \"position\": \"before\",\n          },\n        ],\n        \"x-codeSamples\": [\n          {\n            \"lang\": \"C#\",\n            \"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\",\n          },\n          {\n            \"lang\": \"PHP\",\n            \"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\",\n          },\n        ],\n      },\n      \"put\": {\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Pet\",\n        },\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n          },\n          \"405\": {\n            \"description\": \"Validation exception\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"tags\": [\n          \"pet\",\n        ],\n        \"x-badges\": [\n          {\n            \"color\": \"purple\",\n            \"name\": \"Alpha\",\n          },\n        ],\n        \"x-codeSamples\": [\n          {\n            \"lang\": \"PHP\",\n            \"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\",\n          },\n        ],\n      },\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"parameters\": [\n          {\n            \"description\": \"Status values that need to be considered for filter\",\n            \"in\": \"query\",\n            \"name\": \"status\",\n            \"required\": true,\n            \"schema\": {\n              \"items\": {\n                \"default\": \"available\",\n                \"enum\": [\n                  \"available\",\n                  \"pending\",\n                  \"sold\",\n                ],\n                \"type\": \"string\",\n              },\n              \"maxItems\": 3,\n              \"minItems\": 1,\n              \"type\": \"array\",\n            },\n            \"style\": \"form\",\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/findByTags\": {\n      \"get\": {\n        \"deprecated\": true,\n        \"description\": \"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\",\n        \"operationId\": \"findPetsByTags\",\n        \"parameters\": [\n          {\n            \"description\": \"Tags to filter by\",\n            \"in\": \"query\",\n            \"name\": \"tags\",\n            \"required\": true,\n            \"schema\": {\n              \"items\": {\n                \"type\": \"string\",\n              },\n              \"type\": \"array\",\n            },\n            \"style\": \"form\",\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                    \"maxItems\": 111,\n                  },\n                  \"maxItems\": 999,\n                  \"type\": \"array\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Finds Pets by tags\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/{petId}\": {\n      \"delete\": {\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"parameters\": [\n          {\n            \"example\": \"Bearer <TOKEN>\",\n            \"in\": \"header\",\n            \"name\": \"api_key\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n          {\n            \"description\": \"Pet id to delete\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid pet value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"parameters\": [\n          {\n            \"deprecated\": true,\n            \"description\": \"ID of pet to return\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n          },\n        },\n        \"security\": [\n          {\n            \"api_key\": [],\n          },\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"tags\": [\n          \"pet\",\n        ],\n        \"x-badges\": [\n          {\n            \"name\": \"Gamma\",\n          },\n        ],\n      },\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet that needs to be updated\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/x-www-form-urlencoded\": {\n              \"schema\": {\n                \"properties\": {\n                  \"name\": {\n                    \"description\": \"Updated name of the pet\",\n                    \"type\": \"string\",\n                  },\n                  \"status\": {\n                    \"description\": \"Updated status of the pet\",\n                    \"type\": \"string\",\n                  },\n                },\n                \"type\": \"object\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet to update\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/octet-stream\": {\n              \"schema\": {\n                \"format\": \"binary\",\n                \"type\": \"string\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ApiResponse\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"uploads an image\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"additionalProperties\": {\n                    \"format\": \"int32\",\n                    \"type\": \"integer\",\n                  },\n                  \"minProperties\": 2,\n                  \"type\": \"object\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n        },\n        \"security\": [\n          {\n            \"api_key\": [],\n          },\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Order\",\n              },\n            },\n          },\n          \"description\": \"order placed for purchasing the pet\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"content\": {\n              \"application/json\": {\n                \"example\": {\n                  \"message\": \"Invalid Order\",\n                  \"status\": 400,\n                },\n              },\n            },\n            \"description\": \"Invalid Order\",\n          },\n        },\n        \"summary\": \"Place an order for a pet\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/store/order/{orderId}\": {\n      \"delete\": {\n        \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of the order that needs to be deleted\",\n            \"in\": \"path\",\n            \"name\": \"orderId\",\n            \"required\": true,\n            \"schema\": {\n              \"minimum\": 1,\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Order not found\",\n          },\n        },\n        \"summary\": \"Delete purchase order by ID\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"in\": \"path\",\n            \"name\": \"orderId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"maximum\": 5,\n              \"minimum\": 1,\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Order not found\",\n          },\n        },\n        \"summary\": \"Find purchase order by ID\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/store/subscribe\": {\n      \"post\": {\n        \"callbacks\": {\n          \"orderDelivered\": {\n            \"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}\": {\n              \"post\": {\n                \"deprecated\": true,\n                \"description\": \"A callback triggered every time an Order is delivered to the recipient\",\n                \"requestBody\": {\n                  \"content\": {\n                    \"application/json\": {\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                          \"timestamp\": {\n                            \"example\": \"2018-10-19T16:46:45Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                  },\n                },\n                \"responses\": {\n                  \"200\": {\n                    \"description\": \"Callback successfully processed and no retries will be performed\",\n                  },\n                },\n                \"summary\": \"Order delivered\",\n              },\n            },\n          },\n          \"orderInProgress\": {\n            \"{$request.body#/callbackUrl}?event={$request.body#/eventName}\": {\n              \"post\": {\n                \"description\": \"A callback triggered every time an Order is updated status to \"inProgress\" (Description)\",\n                \"externalDocs\": {\n                  \"description\": \"Find out more\",\n                  \"url\": \"https://more-details.com/demo\",\n                },\n                \"requestBody\": {\n                  \"content\": {\n                    \"application/json\": {\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                          \"status\": {\n                            \"example\": \"inProgress\",\n                            \"type\": \"string\",\n                          },\n                          \"timestamp\": {\n                            \"example\": \"2018-10-19T16:46:45Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                    \"application/xml\": {\n                      \"example\": \"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n  <orderId>123</orderId>\n  <status>inProgress</status>\n  <timestamp>2018-10-19T16:46:45Z</timestamp>\n</root>\n\",\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                  },\n                },\n                \"responses\": {\n                  \"200\": {\n                    \"content\": {\n                      \"application/json\": {\n                        \"schema\": {\n                          \"properties\": {\n                            \"someProp\": {\n                              \"example\": \"123\",\n                              \"type\": \"string\",\n                            },\n                          },\n                          \"type\": \"object\",\n                        },\n                      },\n                    },\n                    \"description\": \"Callback successfully processed and no retries will be performed\",\n                  },\n                  \"299\": {\n                    \"description\": \"Response for cancelling subscription\",\n                  },\n                  \"500\": {\n                    \"description\": \"Callback processing failed and retries will be performed\",\n                  },\n                },\n                \"summary\": \"Order in Progress (Summary)\",\n                \"x-codeSamples\": [\n                  {\n                    \"lang\": \"C#\",\n                    \"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\",\n                  },\n                  {\n                    \"lang\": \"PHP\",\n                    \"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\",\n                  },\n                ],\n              },\n              \"put\": {\n                \"description\": \"Order in Progress (Only Description)\",\n                \"requestBody\": {\n                  \"content\": {\n                    \"application/json\": {\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                          \"status\": {\n                            \"example\": \"inProgress\",\n                            \"type\": \"string\",\n                          },\n                          \"timestamp\": {\n                            \"example\": \"2018-10-19T16:46:45Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                    \"application/xml\": {\n                      \"example\": \"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n  <orderId>123</orderId>\n  <status>inProgress</status>\n  <timestamp>2018-10-19T16:46:45Z</timestamp>\n</root>\n\",\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                  },\n                },\n                \"responses\": {\n                  \"200\": {\n                    \"content\": {\n                      \"application/json\": {\n                        \"schema\": {\n                          \"properties\": {\n                            \"someProp\": {\n                              \"example\": \"123\",\n                              \"type\": \"string\",\n                            },\n                          },\n                          \"type\": \"object\",\n                        },\n                      },\n                    },\n                    \"description\": \"Callback successfully processed and no retries will be performed\",\n                  },\n                },\n                \"servers\": [\n                  {\n                    \"description\": \"Operation level server 1 (Operation override)\",\n                    \"url\": \"//callback-url.operation-level/v1\",\n                  },\n                  {\n                    \"description\": \"Operation level server 2 (Operation override)\",\n                    \"url\": \"//callback-url.operation-level/v2\",\n                  },\n                ],\n              },\n              \"servers\": [\n                {\n                  \"description\": \"Path level server 1\",\n                  \"url\": \"//callback-url.path-level/v1\",\n                },\n                {\n                  \"description\": \"Path level server 2\",\n                  \"url\": \"//callback-url.path-level/v2\",\n                },\n              ],\n            },\n          },\n          \"orderShipped\": {\n            \"{$request.body#/callbackUrl}?event={$request.body#/eventName}\": {\n              \"post\": {\n                \"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\",\n                \"requestBody\": {\n                  \"content\": {\n                    \"application/json\": {\n                      \"schema\": {\n                        \"properties\": {\n                          \"estimatedDeliveryDate\": {\n                            \"example\": \"2018-11-11T16:00:00Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                          \"timestamp\": {\n                            \"example\": \"2018-10-19T16:46:45Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                  },\n                },\n                \"responses\": {\n                  \"200\": {\n                    \"description\": \"Callback successfully processed and no retries will be performed\",\n                  },\n                },\n              },\n            },\n          },\n        },\n        \"description\": \"Add subscription for a store events\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"properties\": {\n                  \"callbackUrl\": {\n                    \"description\": \"This URL will be called by the server when the desired event will occur\",\n                    \"example\": \"https://myserver.com/send/callback/here\",\n                    \"format\": \"uri\",\n                    \"type\": \"string\",\n                  },\n                  \"eventName\": {\n                    \"description\": \"Event name for the subscription\",\n                    \"enum\": [\n                      \"orderInProgress\",\n                      \"orderShipped\",\n                      \"orderDelivered\",\n                    ],\n                    \"example\": \"orderInProgress\",\n                    \"type\": \"string\",\n                  },\n                },\n                \"required\": [\n                  \"callbackUrl\",\n                  \"eventName\",\n                ],\n                \"type\": \"object\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"201\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"properties\": {\n                    \"subscriptionId\": {\n                      \"example\": \"AAA-123-BBB-456\",\n                      \"type\": \"string\",\n                    },\n                  },\n                  \"type\": \"object\",\n                },\n              },\n            },\n            \"description\": \"Subscription added\",\n          },\n        },\n        \"summary\": \"Subscribe to the Store events\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/user\": {\n      \"post\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n            },\n          },\n          \"description\": \"Created user object\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Create user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/UserArray\",\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Creates list of users with given input array\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/UserArray\",\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Creates list of users with given input array\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"parameters\": [\n          {\n            \"description\": \"The user name for login\",\n            \"in\": \"query\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n          {\n            \"description\": \"The password for login in clear text\",\n            \"in\": \"query\",\n            \"name\": \"password\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"OK\",\n                  },\n                },\n                \"schema\": {\n                  \"type\": \"string\",\n                },\n              },\n              \"application/xml\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"<Message> OK </Message>\",\n                  },\n                },\n                \"schema\": {\n                  \"type\": \"string\",\n                },\n              },\n              \"text/plain\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"OK\",\n                  },\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"description\": \"date in UTC when token expires\",\n                \"schema\": {\n                  \"format\": \"date-time\",\n                  \"type\": \"string\",\n                },\n              },\n              \"X-Rate-Limit\": {\n                \"description\": \"calls per hour allowed by the user\",\n                \"schema\": {\n                  \"format\": \"int32\",\n                  \"type\": \"integer\",\n                },\n              },\n            },\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\",\n          },\n        },\n        \"summary\": \"Logs user into the system\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Logs out current logged in user session\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/{username}\": {\n      \"delete\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"parameters\": [\n          {\n            \"description\": \"The name that needs to be deleted\",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid username supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Delete user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"parameters\": [\n          {\n            \"description\": \"The name that needs to be fetched. Use user1 for testing. \",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Get user by user name\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n      \"put\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"parameters\": [\n          {\n            \"description\": \"name that need to be deleted\",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n            },\n          },\n          \"description\": \"Updated user object\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Updated user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n  },\n  \"security\": [\n    {},\n  ],\n  \"servers\": [\n    {\n      \"description\": \"Default server\",\n      \"url\": \"//petstore.swagger.io/v2\",\n    },\n    {\n      \"description\": \"Sandbox server\",\n      \"url\": \"//petstore.swagger.io/sandbox\",\n    },\n  ],\n  \"tags\": [\n    {\n      \"description\": \"Everything about your Pets\",\n      \"name\": \"pet\",\n    },\n    {\n      \"description\": \"Access to Petstore orders\",\n      \"name\": \"store\",\n    },\n    {\n      \"description\": \"Operations about user\",\n      \"name\": \"user\",\n    },\n    {\n      \"description\": \"<SchemaDefinition schemaRef=\"#/components/schemas/Pet\" />\n\",\n      \"name\": \"pet_model\",\n      \"x-displayName\": \"The Pet Model\",\n    },\n    {\n      \"description\": \"<SchemaDefinition schemaRef=\"#/components/schemas/Order\" exampleRef=\"#/components/examples/Order\" showReadOnly={true} showWriteOnly={true} />\n\",\n      \"name\": \"store_model\",\n      \"x-displayName\": \"The Order Model\",\n    },\n  ],\n  \"x-tagGroups\": [\n    {\n      \"name\": \"General\",\n      \"tags\": [\n        \"pet\",\n        \"store\",\n      ],\n    },\n    {\n      \"name\": \"User Management\",\n      \"tags\": [\n        \"user\",\n      ],\n    },\n    {\n      \"name\": \"Models\",\n      \"tags\": [\n        \"pet_model\",\n        \"store_model\",\n      ],\n    },\n  ],\n  \"x-webhooks\": {\n    \"newPet\": {\n      \"post\": {\n        \"description\": \"Information about a new pet in the systems\",\n        \"operationId\": \"newPet\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Pet\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Return a 200 status to indicate that the data was received successfully\",\n          },\n        },\n        \"summary\": \"New pet\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n  },\n}\n`;\n\nexports[`#loadAndBundleSpec should load And Bundle Spec demo/openapi-3-1.yaml 1`] = `\n{\n  \"components\": {\n    \"examples\": {\n      \"Order\": {\n        \"value\": {\n          \"complete\": false,\n          \"quantity\": 1,\n          \"shipDate\": \"2018-10-19T16:46:45Z\",\n          \"status\": \"placed\",\n        },\n      },\n    },\n    \"pathItems\": {\n      \"webhooks\": {\n        \"post\": {\n          \"description\": \"Info about new cat\",\n          \"operationId\": \"createdCat\",\n          \"requestBody\": {\n            \"content\": {\n              \"multipart/form-data\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Cat\",\n                },\n              },\n            },\n            \"description\": \"Information about cat in the system\",\n          },\n          \"responses\": {\n            \"200\": {\n              \"description\": \"create Cat details\",\n            },\n          },\n          \"summary\": \"Create new cat\",\n          \"tags\": [\n            \"webhooks\",\n          ],\n        },\n        \"put\": {\n          \"description\": \"Get a cat details after update\",\n          \"operationId\": \"updatedCat\",\n          \"requestBody\": {\n            \"content\": {\n              \"multipart/form-data\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Cat\",\n                },\n              },\n            },\n            \"description\": \"Information about cat in the system\",\n          },\n          \"responses\": {\n            \"200\": {\n              \"description\": \"update Cat details\",\n            },\n          },\n          \"summary\": \"Get a cat details after update\",\n          \"tags\": [\n            \"webhooks\",\n          ],\n        },\n      },\n    },\n    \"requestBodies\": {\n      \"Pet\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Pet\",\n              \"description\": \"My Pet\",\n              \"title\": \"Pettie\",\n            },\n          },\n          \"application/xml\": {\n            \"schema\": {\n              \"properties\": {\n                \"name\": {\n                  \"description\": \"hooray\",\n                  \"type\": \"string\",\n                },\n              },\n              \"type\": \"object\",\n            },\n          },\n        },\n        \"description\": \"Pet object that needs to be added to the store\",\n        \"required\": true,\n      },\n      \"UserArray\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"items\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n              \"type\": \"array\",\n            },\n          },\n        },\n        \"description\": \"List of user object\",\n        \"required\": true,\n      },\n    },\n    \"schemas\": {\n      \"ApiResponse\": {\n        \"patternProperties\": {\n          \"^O_\\\\\\\\w+\\\\\\\\.[1-9]{2,4}$\": {\n            \"properties\": {\n              \"nestedProperty\": {\n                \"default\": \"lazy\",\n                \"description\": \"The measured skill for hunting\",\n                \"enum\": [\n                  \"clueless\",\n                  \"lazy\",\n                  \"adventurous\",\n                  \"aggressive\",\n                ],\n                \"example\": \"adventurous\",\n                \"type\": [\n                  \"string\",\n                  \"boolean\",\n                ],\n              },\n            },\n            \"type\": \"object\",\n          },\n          \"^S_\\\\\\\\w+\\\\\\\\.[1-9]{2,4}$\": {\n            \"description\": \"The measured skill for hunting\",\n            \"else\": {\n              \"maxLength\": 10,\n              \"minLength\": 1,\n            },\n            \"if\": {\n              \"x-displayName\": \"fieldName === 'status'\",\n            },\n            \"then\": {\n              \"enum\": [\n                \"success\",\n                \"failed\",\n              ],\n              \"format\": \"url\",\n              \"type\": \"string\",\n            },\n          },\n        },\n        \"properties\": {\n          \"code\": {\n            \"format\": \"int32\",\n            \"type\": \"integer\",\n          },\n          \"message\": {\n            \"type\": \"string\",\n          },\n          \"type\": {\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n      },\n      \"Cat\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"huntingSkill\": {\n                \"default\": \"lazy\",\n                \"description\": \"The measured skill for hunting\",\n                \"enum\": [\n                  \"clueless\",\n                  \"lazy\",\n                  \"adventurous\",\n                  \"aggressive\",\n                ],\n                \"example\": \"adventurous\",\n                \"type\": [\n                  \"string\",\n                  \"boolean\",\n                ],\n              },\n            },\n            \"required\": [\n              \"huntingSkill\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a cat\",\n      },\n      \"Category\": {\n        \"properties\": {\n          \"id\": {\n            \"$ref\": \"#/components/schemas/Id\",\n            \"description\": \"Category ID\",\n          },\n          \"name\": {\n            \"description\": \"Category name\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"sub\": {\n            \"description\": \"Test Sub Category\",\n            \"properties\": {\n              \"prop1\": {\n                \"description\": \"Dumb Property\",\n                \"type\": \"string\",\n              },\n            },\n            \"type\": \"object\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Category\",\n        },\n      },\n      \"Dog\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"packSize\": {\n                \"default\": 1,\n                \"description\": \"The size of the pack the dog is from\",\n                \"format\": \"int32\",\n                \"minimum\": 1,\n                \"type\": \"integer\",\n              },\n            },\n            \"required\": [\n              \"packSize\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a dog\",\n      },\n      \"HoneyBee\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"honeyPerDay\": {\n                \"description\": \"Average amount of honey produced per day in ounces\",\n                \"example\": 3.14,\n                \"multipleOf\": 0.01,\n                \"type\": \"number\",\n              },\n            },\n            \"required\": [\n              \"honeyPerDay\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a honey bee\",\n      },\n      \"Id\": {\n        \"format\": \"int64\",\n        \"readOnly\": true,\n        \"type\": \"integer\",\n      },\n      \"Order\": {\n        \"properties\": {\n          \"complete\": {\n            \"default\": false,\n            \"description\": \"Indicates whenever order was completed or not\",\n            \"readOnly\": true,\n            \"type\": \"boolean\",\n          },\n          \"id\": {\n            \"$ref\": \"#/components/schemas/Id\",\n            \"description\": \"Order ID\",\n          },\n          \"petId\": {\n            \"$ref\": \"#/components/schemas/Id\",\n            \"description\": \"Pet ID\",\n          },\n          \"quantity\": {\n            \"default\": 1,\n            \"format\": \"int32\",\n            \"minimum\": 1,\n            \"type\": \"integer\",\n          },\n          \"requestId\": {\n            \"description\": \"Unique Request Id\",\n            \"type\": \"string\",\n            \"writeOnly\": true,\n          },\n          \"shipDate\": {\n            \"description\": \"Estimated ship date\",\n            \"format\": \"date-time\",\n            \"type\": \"string\",\n          },\n          \"status\": {\n            \"description\": \"Order Status\",\n            \"enum\": [\n              \"placed\",\n              \"approved\",\n              \"delivered\",\n            ],\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Order\",\n        },\n      },\n      \"Pet\": {\n        \"discriminator\": {\n          \"mapping\": {\n            \"bee\": \"#/components/schemas/HoneyBee\",\n            \"cat\": \"#/components/schemas/Cat\",\n            \"dog\": \"#/components/schemas/Dog\",\n          },\n          \"propertyName\": \"petType\",\n        },\n        \"properties\": {\n          \"category\": {\n            \"$ref\": \"#/components/schemas/Category\",\n            \"description\": \"Categories this pet belongs to\",\n          },\n          \"friend\": {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          \"huntingSkill\": {\n            \"enum\": [\n              0,\n              1,\n              2,\n            ],\n            \"type\": [\n              \"integer\",\n            ],\n          },\n          \"id\": {\n            \"$ref\": \"#/components/schemas/Id\",\n            \"description\": \"Pet ID\",\n            \"externalDocs\": {\n              \"description\": \"Find more info here\",\n              \"url\": \"https://example.com\",\n            },\n          },\n          \"name\": {\n            \"description\": \"The name given to a pet\",\n            \"example\": \"Guru\",\n            \"type\": \"string\",\n          },\n          \"petType\": {\n            \"description\": \"Type of a pet\",\n            \"type\": \"string\",\n          },\n          \"photoUrls\": {\n            \"default\": [],\n            \"description\": \"The list of URL to a cute photos featuring pet\",\n            \"else\": {\n              \"maxItems\": 20,\n              \"minItems\": 1,\n              \"type\": [\n                \"integer\",\n                \"null\",\n              ],\n              \"x-displayName\": \"notString\",\n            },\n            \"if\": {\n              \"type\": \"string\",\n              \"x-displayName\": \"isString\",\n            },\n            \"items\": {\n              \"format\": \"url\",\n              \"type\": \"string\",\n            },\n            \"maxItems\": 10,\n            \"minItems\": 1,\n            \"then\": {\n              \"maxItems\": 15,\n              \"minItems\": 1,\n            },\n            \"type\": [\n              \"string\",\n              \"integer\",\n              \"null\",\n            ],\n            \"xml\": {\n              \"name\": \"photoUrl\",\n              \"wrapped\": true,\n            },\n          },\n          \"status\": {\n            \"default\": \"pending\",\n            \"description\": \"Pet status in the store\",\n            \"enum\": [\n              \"available\",\n              \"pending\",\n              \"sold\",\n            ],\n            \"type\": \"string\",\n          },\n          \"tags\": {\n            \"description\": \"Tags attached to the pet\",\n            \"exclusiveMaximum\": 100,\n            \"exclusiveMinimum\": 0,\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Tag\",\n            },\n            \"type\": \"array\",\n            \"xml\": {\n              \"name\": \"tag\",\n              \"wrapped\": true,\n            },\n          },\n        },\n        \"required\": [\n          \"name\",\n          \"photoUrls\",\n        ],\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Pet\",\n        },\n      },\n      \"Tag\": {\n        \"properties\": {\n          \"id\": {\n            \"$ref\": \"#/components/schemas/Id\",\n            \"description\": \"Tag ID\",\n            \"type\": \"number\",\n          },\n          \"name\": {\n            \"description\": \"Tag name\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Tag\",\n        },\n      },\n      \"User\": {\n        \"else\": {\n          \"required\": [],\n        },\n        \"if\": {\n          \"properties\": {\n            \"userStatus\": {\n              \"enum\": [\n                10,\n              ],\n            },\n          },\n          \"title\": \"userStatus === 10\",\n        },\n        \"properties\": {\n          \"addresses\": {\n            \"items\": {\n              \"type\": \"string\",\n            },\n            \"maxLength\": 10,\n            \"minItems\": 0,\n            \"prefixItems\": [\n              {\n                \"properties\": {\n                  \"city\": {\n                    \"minLength\": 0,\n                    \"type\": \"string\",\n                  },\n                  \"country\": {\n                    \"minLength\": 0,\n                    \"type\": \"string\",\n                  },\n                  \"street\": {\n                    \"description\": \"includes build/apartment number\",\n                    \"minLength\": 0,\n                    \"type\": \"string\",\n                  },\n                },\n                \"type\": \"object\",\n              },\n              {\n                \"type\": \"number\",\n              },\n            ],\n            \"type\": \"array\",\n          },\n          \"email\": {\n            \"description\": \"User email address\",\n            \"example\": \"john.smith@example.com\",\n            \"format\": \"email\",\n            \"type\": \"string\",\n          },\n          \"firstName\": {\n            \"description\": \"User first name\",\n            \"example\": \"John\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"id\": {\n            \"$ref\": \"#/components/schemas/Id\",\n          },\n          \"image\": {\n            \"contentEncoding\": \"base64\",\n            \"contentMediaType\": \"image/png\",\n            \"description\": \"User image\",\n            \"type\": \"string\",\n          },\n          \"lastName\": {\n            \"description\": \"User last name\",\n            \"example\": \"Smith\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"password\": {\n            \"description\": \"User password, MUST contain a mix of upper and lower case letters, as well as digits\",\n            \"example\": \"drowssaP123\",\n            \"format\": \"password\",\n            \"minLength\": 8,\n            \"pattern\": \"/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])/\",\n            \"type\": \"string\",\n          },\n          \"pet\": {\n            \"oneOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Pet\",\n                \"title\": \"Pettie\",\n              },\n              {\n                \"$ref\": \"#/components/schemas/Tag\",\n              },\n            ],\n          },\n          \"phone\": {\n            \"description\": \"User phone number in international format\",\n            \"example\": \"+1-202-555-0192\",\n            \"pattern\": \"/^\\\\+(?:[0-9]-?){6,14}[0-9]$/\",\n            \"type\": \"string\",\n          },\n          \"userStatus\": {\n            \"description\": \"User status\",\n            \"format\": \"int32\",\n            \"type\": \"integer\",\n          },\n          \"username\": {\n            \"description\": \"User supplied username\",\n            \"example\": \"John78\",\n            \"minLength\": 4,\n            \"type\": \"string\",\n          },\n        },\n        \"then\": {\n          \"required\": [\n            \"phone\",\n          ],\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"User\",\n        },\n      },\n    },\n    \"securitySchemes\": {\n      \"api_key\": {\n        \"description\": \"For this sample, you can use the api key \\`special-key\\` to test the authorization filters.\n\",\n        \"in\": \"header\",\n        \"name\": \"api_key\",\n        \"type\": \"apiKey\",\n      },\n      \"petstore_auth\": {\n        \"description\": \"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n\",\n        \"flows\": {\n          \"implicit\": {\n            \"authorizationUrl\": \"http://petstore.swagger.io/api/oauth/dialog\",\n            \"scopes\": {\n              \"read:pets\": \"read your pets\",\n              \"write:pets\": \"modify pets in your account\",\n            },\n          },\n        },\n        \"type\": \"oauth2\",\n      },\n    },\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out how to create Github repo for your OpenAPI spec.\",\n    \"url\": \"https://github.com/Rebilly/generator-openapi-repo\",\n  },\n  \"info\": {\n    \"contact\": {\n      \"email\": \"apiteam@swagger.io\",\n      \"name\": \"API Support\",\n      \"url\": \"https://github.com/Redocly/redoc\",\n    },\n    \"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/main/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/main/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<SecurityDefinitions />\n\",\n    \"license\": {\n      \"identifier\": \"Apache 2.0\",\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\",\n    },\n    \"summary\": \"My lovely API\",\n    \"termsOfService\": \"http://swagger.io/terms/\",\n    \"title\": \"Swagger Petstore\",\n    \"version\": \"1.0.0\",\n    \"x-logo\": {\n      \"altText\": \"Petstore logo\",\n      \"url\": \"https://redocly.github.io/redoc/petstore-logo.png\",\n    },\n  },\n  \"openapi\": \"3.1.0\",\n  \"paths\": {\n    \"/pet\": {\n      \"delete\": {\n        \"operationId\": \"deletePetBy\"Id\",\n        \"summary\": \"OperationId with quotes\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n      \"get\": {\n        \"operationId\": \"delete\\\\PetById\",\n        \"summary\": \"OperationId with backslash\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n      \"parameters\": [\n        {\n          \"description\": \"The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US\",\n          \"example\": \"en-US\",\n          \"in\": \"header\",\n          \"name\": \"Accept-Language\",\n          \"required\": false,\n          \"schema\": {\n            \"default\": \"en-AU\",\n            \"type\": \"string\",\n          },\n        },\n        {\n          \"description\": \"Some cookie\",\n          \"in\": \"cookie\",\n          \"name\": \"cookieParam\",\n          \"required\": true,\n          \"schema\": {\n            \"format\": \"int64\",\n            \"type\": \"integer\",\n          },\n        },\n      ],\n      \"post\": {\n        \"description\": \"Add new pet to the store inventory.\",\n        \"operationId\": \"addPet\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Pet\",\n        },\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"tags\": [\n          \"pet\",\n        ],\n        \"x-codeSamples\": [\n          {\n            \"lang\": \"C#\",\n            \"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\",\n          },\n          {\n            \"lang\": \"PHP\",\n            \"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\",\n          },\n        ],\n      },\n      \"put\": {\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Pet\",\n        },\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n          },\n          \"405\": {\n            \"description\": \"Validation exception\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"tags\": [\n          \"pet\",\n        ],\n        \"x-codeSamples\": [\n          {\n            \"lang\": \"PHP\",\n            \"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\",\n          },\n        ],\n      },\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"parameters\": [\n          {\n            \"description\": \"Status values that need to be considered for filter\",\n            \"in\": \"query\",\n            \"name\": \"status\",\n            \"required\": true,\n            \"schema\": {\n              \"items\": {\n                \"default\": \"available\",\n                \"enum\": [\n                  \"available\",\n                  \"pending\",\n                  \"sold\",\n                ],\n                \"type\": \"string\",\n              },\n              \"maxItems\": 3,\n              \"minItems\": 1,\n              \"type\": \"array\",\n            },\n            \"style\": \"form\",\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/findByTags\": {\n      \"get\": {\n        \"deprecated\": true,\n        \"description\": \"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\",\n        \"operationId\": \"findPetsByTags\",\n        \"parameters\": [\n          {\n            \"description\": \"Tags to filter by\",\n            \"in\": \"query\",\n            \"name\": \"tags\",\n            \"required\": true,\n            \"schema\": {\n              \"items\": {\n                \"type\": \"string\",\n              },\n              \"type\": \"array\",\n            },\n            \"style\": \"form\",\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Finds Pets by tags\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/{petId}\": {\n      \"delete\": {\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"parameters\": [\n          {\n            \"example\": \"Bearer <TOKEN>\",\n            \"in\": \"header\",\n            \"name\": \"api_key\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n          {\n            \"description\": \"Pet id to delete\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid pet value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"parameters\": [\n          {\n            \"deprecated\": true,\n            \"description\": \"ID of pet to return\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n          },\n        },\n        \"security\": [\n          {\n            \"api_key\": [],\n          },\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet that needs to be updated\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/x-www-form-urlencoded\": {\n              \"schema\": {\n                \"properties\": {\n                  \"name\": {\n                    \"description\": \"Updated name of the pet\",\n                    \"type\": \"string\",\n                  },\n                  \"status\": {\n                    \"description\": \"Updated status of the pet\",\n                    \"type\": \"string\",\n                  },\n                },\n                \"type\": \"object\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet to update\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/octet-stream\": {\n              \"schema\": {\n                \"format\": \"binary\",\n                \"type\": \"string\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ApiResponse\",\n                  \"unevaluatedProperties\": {\n                    \"format\": \"int32\",\n                    \"type\": \"integer\",\n                  },\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"uploads an image\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"additionalProperties\": {\n                    \"format\": \"int32\",\n                    \"type\": \"integer\",\n                  },\n                  \"type\": \"object\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n        },\n        \"security\": [\n          {\n            \"api_key\": [],\n          },\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Order\",\n              },\n            },\n          },\n          \"description\": \"order placed for purchasing the pet\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"content\": {\n              \"application/json\": {\n                \"example\": {\n                  \"message\": \"Invalid Order\",\n                  \"status\": 400,\n                },\n              },\n            },\n            \"description\": \"Invalid Order\",\n          },\n        },\n        \"summary\": \"Place an order for a pet\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/store/order/{orderId}\": {\n      \"delete\": {\n        \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of the order that needs to be deleted\",\n            \"in\": \"path\",\n            \"name\": \"orderId\",\n            \"required\": true,\n            \"schema\": {\n              \"minimum\": 1,\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Order not found\",\n          },\n        },\n        \"summary\": \"Delete purchase order by ID\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"in\": \"path\",\n            \"name\": \"orderId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"maximum\": 5,\n              \"minimum\": 1,\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Order not found\",\n          },\n        },\n        \"summary\": \"Find purchase order by ID\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/store/subscribe\": {\n      \"post\": {\n        \"callbacks\": {\n          \"orderDelivered\": {\n            \"http://notificationServer.com?url={$request.body#/callbackUrl}&event={$request.body#/eventName}\": {\n              \"post\": {\n                \"deprecated\": true,\n                \"description\": \"A callback triggered every time an Order is delivered to the recipient\",\n                \"requestBody\": {\n                  \"content\": {\n                    \"application/json\": {\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                          \"timestamp\": {\n                            \"example\": \"2018-10-19T16:46:45Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                  },\n                },\n                \"responses\": {\n                  \"200\": {\n                    \"description\": \"Callback successfully processed and no retries will be performed\",\n                  },\n                },\n                \"summary\": \"Order delivered\",\n              },\n            },\n          },\n          \"orderInProgress\": {\n            \"{$request.body#/callbackUrl}?event={$request.body#/eventName}\": {\n              \"post\": {\n                \"description\": \"A callback triggered every time an Order is updated status to \"inProgress\" (Description)\",\n                \"externalDocs\": {\n                  \"description\": \"Find out more\",\n                  \"url\": \"https://more-details.com/demo\",\n                },\n                \"requestBody\": {\n                  \"content\": {\n                    \"application/json\": {\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                          \"status\": {\n                            \"example\": \"inProgress\",\n                            \"type\": \"string\",\n                          },\n                          \"timestamp\": {\n                            \"example\": \"2018-10-19T16:46:45Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                    \"application/xml\": {\n                      \"example\": \"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n  <orderId>123</orderId>\n  <status>inProgress</status>\n  <timestamp>2018-10-19T16:46:45Z</timestamp>\n</root>\n\",\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                  },\n                },\n                \"responses\": {\n                  \"200\": {\n                    \"content\": {\n                      \"application/json\": {\n                        \"schema\": {\n                          \"properties\": {\n                            \"someProp\": {\n                              \"example\": \"123\",\n                              \"type\": \"string\",\n                            },\n                          },\n                          \"type\": \"object\",\n                        },\n                      },\n                    },\n                    \"description\": \"Callback successfully processed and no retries will be performed\",\n                  },\n                  \"299\": {\n                    \"description\": \"Response for cancelling subscription\",\n                  },\n                  \"500\": {\n                    \"description\": \"Callback processing failed and retries will be performed\",\n                  },\n                },\n                \"summary\": \"Order in Progress (Summary)\",\n                \"x-codeSamples\": [\n                  {\n                    \"lang\": \"C#\",\n                    \"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\",\n                  },\n                  {\n                    \"lang\": \"PHP\",\n                    \"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\",\n                  },\n                ],\n              },\n              \"put\": {\n                \"description\": \"Order in Progress (Only Description)\",\n                \"requestBody\": {\n                  \"content\": {\n                    \"application/json\": {\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                          \"status\": {\n                            \"example\": \"inProgress\",\n                            \"type\": \"string\",\n                          },\n                          \"timestamp\": {\n                            \"example\": \"2018-10-19T16:46:45Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                    \"application/xml\": {\n                      \"example\": \"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n  <orderId>123</orderId>\n  <status>inProgress</status>\n  <timestamp>2018-10-19T16:46:45Z</timestamp>\n</root>\n\",\n                      \"schema\": {\n                        \"properties\": {\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                  },\n                },\n                \"responses\": {\n                  \"200\": {\n                    \"content\": {\n                      \"application/json\": {\n                        \"schema\": {\n                          \"properties\": {\n                            \"someProp\": {\n                              \"example\": \"123\",\n                              \"type\": \"string\",\n                            },\n                          },\n                          \"type\": \"object\",\n                        },\n                      },\n                    },\n                    \"description\": \"Callback successfully processed and no retries will be performed\",\n                  },\n                },\n                \"servers\": [\n                  {\n                    \"description\": \"Operation level server 1 (Operation override)\",\n                    \"url\": \"//callback-url.operation-level/v1\",\n                  },\n                  {\n                    \"description\": \"Operation level server 2 (Operation override)\",\n                    \"url\": \"//callback-url.operation-level/v2\",\n                  },\n                ],\n              },\n              \"servers\": [\n                {\n                  \"description\": \"Path level server 1\",\n                  \"url\": \"//callback-url.path-level/v1\",\n                },\n                {\n                  \"description\": \"Path level server 2\",\n                  \"url\": \"//callback-url.path-level/v2\",\n                },\n              ],\n            },\n          },\n          \"orderShipped\": {\n            \"{$request.body#/callbackUrl}?event={$request.body#/eventName}\": {\n              \"post\": {\n                \"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\",\n                \"requestBody\": {\n                  \"content\": {\n                    \"application/json\": {\n                      \"schema\": {\n                        \"properties\": {\n                          \"estimatedDeliveryDate\": {\n                            \"example\": \"2018-11-11T16:00:00Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                          \"orderId\": {\n                            \"example\": \"123\",\n                            \"type\": \"string\",\n                          },\n                          \"timestamp\": {\n                            \"example\": \"2018-10-19T16:46:45Z\",\n                            \"format\": \"date-time\",\n                            \"type\": \"string\",\n                          },\n                        },\n                        \"type\": \"object\",\n                      },\n                    },\n                  },\n                },\n                \"responses\": {\n                  \"200\": {\n                    \"description\": \"Callback successfully processed and no retries will be performed\",\n                  },\n                },\n              },\n            },\n          },\n        },\n        \"description\": \"Add subscription for a store events\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"properties\": {\n                  \"callbackUrl\": {\n                    \"description\": \"This URL will be called by the server when the desired event will occur\",\n                    \"example\": \"https://myserver.com/send/callback/here\",\n                    \"format\": \"uri\",\n                    \"type\": \"string\",\n                  },\n                  \"eventName\": {\n                    \"description\": \"Event name for the subscription\",\n                    \"enum\": [\n                      \"orderInProgress\",\n                      \"orderShipped\",\n                      \"orderDelivered\",\n                    ],\n                    \"example\": \"orderInProgress\",\n                    \"type\": \"string\",\n                  },\n                },\n                \"required\": [\n                  \"callbackUrl\",\n                  \"eventName\",\n                ],\n                \"type\": \"object\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"items\": {\n                      \"type\": \"number\",\n                    },\n                    \"maxItems\": 777,\n                    \"minItems\": 111,\n                    \"type\": \"array\",\n                  },\n                  \"maxItems\": 999,\n                  \"minItems\": 0,\n                  \"type\": \"array\",\n                },\n              },\n            },\n            \"description\": \"Successful operation\",\n          },\n          \"201\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"properties\": {\n                    \"subscriptionId\": {\n                      \"example\": \"AAA-123-BBB-456\",\n                      \"type\": \"string\",\n                    },\n                  },\n                  \"type\": \"object\",\n                },\n              },\n            },\n            \"description\": \"Subscription added\",\n          },\n        },\n        \"summary\": \"Subscribe to the Store events\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/user\": {\n      \"post\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n            },\n          },\n          \"description\": \"Created user object\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Create user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/UserArray\",\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Creates list of users with given input array\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/UserArray\",\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Creates list of users with given input array\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"parameters\": [\n          {\n            \"description\": \"The user name for login\",\n            \"in\": \"query\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n          {\n            \"description\": \"The password for login in clear text\",\n            \"in\": \"query\",\n            \"name\": \"password\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"OK\",\n                  },\n                },\n                \"schema\": {\n                  \"type\": \"string\",\n                },\n              },\n              \"application/xml\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"<Message> OK </Message>\",\n                  },\n                },\n                \"schema\": {\n                  \"type\": \"string\",\n                },\n              },\n              \"text/plain\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"OK\",\n                  },\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"description\": \"date in UTC when token expires\",\n                \"schema\": {\n                  \"format\": \"date-time\",\n                  \"type\": \"string\",\n                },\n              },\n              \"X-Rate-Limit\": {\n                \"description\": \"calls per hour allowed by the user\",\n                \"schema\": {\n                  \"format\": \"int32\",\n                  \"type\": \"integer\",\n                },\n              },\n            },\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\",\n          },\n        },\n        \"summary\": \"Logs user into the system\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Logs out current logged in user session\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/{username}\": {\n      \"delete\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"parameters\": [\n          {\n            \"description\": \"The name that needs to be deleted\",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"204\": {\n            \"description\": \"User is deleted\",\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Delete user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"parameters\": [\n          {\n            \"description\": \"The name that needs to be fetched. Use user1 for testing. \",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Get user by user name\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n      \"put\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"parameters\": [\n          {\n            \"description\": \"name that need to be updated\",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n            },\n          },\n          \"description\": \"Updated user object\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\",\n                },\n              },\n            },\n            \"description\": \"User is updated successfully\",\n          },\n          \"400\": {\n            \"description\": \"Invalid user supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Updated user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n  },\n  \"security\": [\n    {},\n  ],\n  \"servers\": [\n    {\n      \"description\": \"Default server\",\n      \"url\": \"//petstore.swagger.io/v2\",\n    },\n    {\n      \"description\": \"Sandbox server\",\n      \"url\": \"//petstore.swagger.io/sandbox\",\n    },\n  ],\n  \"tags\": [\n    {\n      \"description\": \"Everything about your Pets\",\n      \"name\": \"pet\",\n    },\n    {\n      \"description\": \"Access to Petstore orders\",\n      \"name\": \"store\",\n    },\n    {\n      \"description\": \"Operations about user\",\n      \"name\": \"user\",\n    },\n    {\n      \"description\": \"Everything about your Webhooks\",\n      \"name\": \"webhooks\",\n    },\n    {\n      \"description\": \"<SchemaDefinition schemaRef=\"#/components/schemas/Pet\" />\n\",\n      \"name\": \"pet_model\",\n      \"x-displayName\": \"The Pet Model\",\n    },\n    {\n      \"description\": \"<SchemaDefinition schemaRef=\"#/components/schemas/Order\" exampleRef=\"#/components/examples/Order\" showReadOnly={true} showWriteOnly={true} />\n\",\n      \"name\": \"store_model\",\n      \"x-displayName\": \"The Order Model\",\n    },\n  ],\n  \"webhooks\": {\n    \"myWebhook\": {\n      \"$ref\": \"#/components/pathItems/webhooks\",\n      \"description\": \"Overriding description\",\n      \"summary\": \"Overriding summary\",\n    },\n    \"newPet\": {\n      \"post\": {\n        \"description\": \"Information about a new pet in the systems\",\n        \"operationId\": \"newPet\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Pet\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"200\": {\n            \"description\": \"Return a 200 status to indicate that the data was received successfully\",\n          },\n        },\n        \"summary\": \"New pet\",\n        \"tags\": [\n          \"webhooks\",\n        ],\n      },\n    },\n  },\n  \"x-tagGroups\": [\n    {\n      \"name\": \"General\",\n      \"tags\": [\n        \"pet\",\n        \"store\",\n        \"webhooks\",\n      ],\n    },\n    {\n      \"name\": \"User Management\",\n      \"tags\": [\n        \"user\",\n      ],\n    },\n    {\n      \"name\": \"Models\",\n      \"tags\": [\n        \"pet_model\",\n        \"store_model\",\n      ],\n    },\n  ],\n}\n`;\n\nexports[`#loadAndBundleSpec should load And Bundle Spec demo/swagger.yaml 1`] = `\n{\n  \"components\": {\n    \"requestBodies\": {\n      \"Pet\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Pet\",\n            },\n          },\n          \"application/xml\": {\n            \"schema\": {\n              \"$ref\": \"#/components/schemas/Pet\",\n            },\n          },\n        },\n        \"description\": \"Pet object that needs to be added to the store\",\n        \"required\": true,\n      },\n      \"UserArray\": {\n        \"content\": {\n          \"application/json\": {\n            \"schema\": {\n              \"items\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n              \"type\": \"array\",\n            },\n          },\n        },\n        \"description\": \"List of user object\",\n        \"required\": true,\n      },\n    },\n    \"schemas\": {\n      \"ApiResponse\": {\n        \"properties\": {\n          \"code\": {\n            \"format\": \"int32\",\n            \"type\": \"integer\",\n          },\n          \"message\": {\n            \"type\": \"string\",\n          },\n          \"type\": {\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n      },\n      \"Cat\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"huntingSkill\": {\n                \"default\": \"lazy\",\n                \"description\": \"The measured skill for hunting\",\n                \"enum\": [\n                  \"clueless\",\n                  \"lazy\",\n                  \"adventurous\",\n                  \"aggressive\",\n                ],\n                \"type\": \"string\",\n              },\n            },\n            \"required\": [\n              \"huntingSkill\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a cat\",\n      },\n      \"Category\": {\n        \"properties\": {\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Category ID\",\n          },\n          \"name\": {\n            \"description\": \"Category name\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"sub\": {\n            \"description\": \"Test Sub Category\",\n            \"properties\": {\n              \"prop1\": {\n                \"description\": \"Dumb Property\",\n                \"type\": \"string\",\n              },\n            },\n            \"type\": \"object\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Category\",\n        },\n      },\n      \"Dog\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"packSize\": {\n                \"default\": 1,\n                \"description\": \"The size of the pack the dog is from\",\n                \"format\": \"int32\",\n                \"minimum\": 1,\n                \"type\": \"integer\",\n              },\n            },\n            \"required\": [\n              \"packSize\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a dog\",\n      },\n      \"HoneyBee\": {\n        \"allOf\": [\n          {\n            \"$ref\": \"#/components/schemas/Pet\",\n          },\n          {\n            \"properties\": {\n              \"honeyPerDay\": {\n                \"description\": \"Average amount of honey produced per day in ounces\",\n                \"example\": 3.14,\n                \"type\": \"number\",\n              },\n            },\n            \"required\": [\n              \"honeyPerDay\",\n            ],\n            \"type\": \"object\",\n          },\n        ],\n        \"description\": \"A representation of a honey bee\",\n      },\n      \"Id\": {\n        \"format\": \"int64\",\n        \"type\": \"integer\",\n      },\n      \"Order\": {\n        \"properties\": {\n          \"complete\": {\n            \"default\": false,\n            \"description\": \"Indicates whenever order was completed or not\",\n            \"type\": \"boolean\",\n          },\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Order ID\",\n          },\n          \"petId\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Pet ID\",\n          },\n          \"quantity\": {\n            \"default\": 1,\n            \"format\": \"int32\",\n            \"minimum\": 1,\n            \"type\": \"integer\",\n          },\n          \"shipDate\": {\n            \"description\": \"Estimated ship date\",\n            \"format\": \"date-time\",\n            \"type\": \"string\",\n          },\n          \"status\": {\n            \"description\": \"Order Status\",\n            \"enum\": [\n              \"placed\",\n              \"approved\",\n              \"delivered\",\n            ],\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Order\",\n        },\n      },\n      \"Pet\": {\n        \"discriminator\": {\n          \"propertyName\": \"petType\",\n        },\n        \"properties\": {\n          \"category\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Category\",\n              },\n            ],\n            \"description\": \"Categories this pet belongs to\",\n          },\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Pet ID\",\n          },\n          \"name\": {\n            \"description\": \"The name given to a pet\",\n            \"example\": \"Guru\",\n            \"type\": \"string\",\n          },\n          \"petType\": {\n            \"description\": \"Type of a pet\",\n            \"type\": \"string\",\n          },\n          \"photoUrls\": {\n            \"default\": [],\n            \"description\": \"The list of URL to a cute photos featuring pet\",\n            \"items\": {\n              \"format\": \"url\",\n              \"type\": \"string\",\n            },\n            \"type\": \"array\",\n            \"xml\": {\n              \"name\": \"photoUrl\",\n              \"wrapped\": true,\n            },\n          },\n          \"status\": {\n            \"description\": \"Pet status in the store\",\n            \"enum\": [\n              \"available\",\n              \"pending\",\n              \"sold\",\n            ],\n            \"type\": \"string\",\n          },\n          \"tags\": {\n            \"description\": \"Tags attached to the pet\",\n            \"items\": {\n              \"$ref\": \"#/components/schemas/Tag\",\n            },\n            \"type\": \"array\",\n            \"xml\": {\n              \"name\": \"tag\",\n              \"wrapped\": true,\n            },\n          },\n        },\n        \"required\": [\n          \"name\",\n          \"photoUrls\",\n        ],\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Pet\",\n        },\n      },\n      \"Tag\": {\n        \"properties\": {\n          \"id\": {\n            \"allOf\": [\n              {\n                \"$ref\": \"#/components/schemas/Id\",\n              },\n            ],\n            \"description\": \"Tag ID\",\n          },\n          \"name\": {\n            \"description\": \"Tag name\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"Tag\",\n        },\n      },\n      \"User\": {\n        \"properties\": {\n          \"email\": {\n            \"description\": \"User email address\",\n            \"example\": \"john.smith@example.com\",\n            \"format\": \"email\",\n            \"type\": \"string\",\n          },\n          \"firstName\": {\n            \"description\": \"User first name\",\n            \"example\": \"John\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"id\": {\n            \"$ref\": \"#/components/schemas/Id\",\n          },\n          \"lastName\": {\n            \"description\": \"User last name\",\n            \"example\": \"Smith\",\n            \"minLength\": 1,\n            \"type\": \"string\",\n          },\n          \"password\": {\n            \"description\": \"User password, MUST contain a mix of upper and lower case letters, as well as digits\",\n            \"example\": \"drowssaP123\",\n            \"format\": \"password\",\n            \"minLength\": 8,\n            \"pattern\": \"(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])\",\n            \"type\": \"string\",\n          },\n          \"phone\": {\n            \"description\": \"User phone number in international format\",\n            \"example\": \"+1-202-555-0192\",\n            \"nullable\": true,\n            \"pattern\": \"^\\\\+(?:[0-9]-?){6,14}[0-9]$\",\n            \"type\": \"string\",\n          },\n          \"userStatus\": {\n            \"description\": \"User status\",\n            \"format\": \"int32\",\n            \"type\": \"integer\",\n          },\n          \"username\": {\n            \"description\": \"User supplied username\",\n            \"example\": \"John78\",\n            \"minLength\": 4,\n            \"type\": \"string\",\n          },\n        },\n        \"type\": \"object\",\n        \"xml\": {\n          \"name\": \"User\",\n        },\n      },\n    },\n    \"securitySchemes\": {\n      \"api_key\": {\n        \"description\": \"For this sample, you can use the api key \\`special-key\\` to test the authorization filters.\n\",\n        \"in\": \"header\",\n        \"name\": \"api_key\",\n        \"type\": \"apiKey\",\n      },\n      \"petstore_auth\": {\n        \"description\": \"Get access to data while protecting your account credentials.\nOAuth2 is also a safer and more secure way to give you access.\n\",\n        \"flows\": {\n          \"implicit\": {\n            \"authorizationUrl\": \"http://petstore.swagger.io/api/oauth/dialog\",\n            \"scopes\": {\n              \"read:pets\": \"read your pets\",\n              \"write:pets\": \"modify pets in your account\",\n            },\n          },\n        },\n        \"type\": \"oauth2\",\n      },\n    },\n  },\n  \"externalDocs\": {\n    \"description\": \"Find out how to create Github repo for your OpenAPI spec.\",\n    \"url\": \"https://github.com/Rebilly/generator-openapi-repo\",\n  },\n  \"info\": {\n    \"contact\": {\n      \"email\": \"apiteam@swagger.io\",\n      \"url\": \"https://github.com/Redocly/redoc\",\n    },\n    \"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# 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/main/docs/redoc-vendor-extensions.md).\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/main/docs/redoc-vendor-extensions.md).\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# Authentication\nPetstore offers two forms of authentication:\n  - API Key\n  - OAuth2\n\nOAuth2 - an open protocol to allow secure authorization in a simple\nand standard method from web, mobile and desktop applications.\n<!-- ReDoc-Inject: <security-definitions> -->\n\",\n    \"license\": {\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\",\n    },\n    \"termsOfService\": \"http://swagger.io/terms/\",\n    \"title\": \"Swagger Petstore\",\n    \"version\": \"1.0.0\",\n    \"x-logo\": {\n      \"altText\": \"Petstore logo\",\n      \"url\": \"https://redocly.github.io/redoc/petstore-logo.png\",\n    },\n  },\n  \"openapi\": \"3.0.0\",\n  \"paths\": {\n    \"/pet\": {\n      \"post\": {\n        \"description\": \"Add new pet to the store inventory.\",\n        \"operationId\": \"addPet\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Pet\",\n        },\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"tags\": [\n          \"pet\",\n        ],\n        \"x-code-samples\": [\n          {\n            \"lang\": \"C#\",\n            \"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\",\n          },\n          {\n            \"lang\": \"PHP\",\n            \"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\",\n          },\n        ],\n      },\n      \"put\": {\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/Pet\",\n        },\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n          },\n          \"405\": {\n            \"description\": \"Validation exception\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"tags\": [\n          \"pet\",\n        ],\n        \"x-code-samples\": [\n          {\n            \"lang\": \"PHP\",\n            \"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\",\n          },\n        ],\n      },\n    },\n    \"/pet/findByStatus\": {\n      \"get\": {\n        \"description\": \"Multiple status values can be provided with comma separated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"parameters\": [\n          {\n            \"description\": \"Status values that need to be considered for filter\",\n            \"explode\": false,\n            \"in\": \"query\",\n            \"name\": \"status\",\n            \"required\": true,\n            \"schema\": {\n              \"items\": {\n                \"default\": \"available\",\n                \"enum\": [\n                  \"available\",\n                  \"pending\",\n                  \"sold\",\n                ],\n                \"type\": \"string\",\n              },\n              \"type\": \"array\",\n            },\n            \"style\": \"form\",\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/findByTags\": {\n      \"get\": {\n        \"deprecated\": true,\n        \"description\": \"Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.\",\n        \"operationId\": \"findPetsByTags\",\n        \"parameters\": [\n          {\n            \"description\": \"Tags to filter by\",\n            \"explode\": false,\n            \"in\": \"query\",\n            \"name\": \"tags\",\n            \"required\": true,\n            \"schema\": {\n              \"items\": {\n                \"type\": \"string\",\n              },\n              \"type\": \"array\",\n            },\n            \"style\": \"form\",\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"items\": {\n                    \"$ref\": \"#/components/schemas/Pet\",\n                  },\n                  \"type\": \"array\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Finds Pets by tags\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/{petId}\": {\n      \"delete\": {\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"parameters\": [\n          {\n            \"example\": \"Bearer <TOKEN>\",\n            \"in\": \"header\",\n            \"name\": \"api_key\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n          {\n            \"description\": \"Pet id to delete\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid pet value\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"Returns a single pet\",\n        \"operationId\": \"getPetById\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet to return\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Pet\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Pet not found\",\n          },\n        },\n        \"security\": [\n          {\n            \"api_key\": [],\n          },\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet that needs to be updated\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/x-www-form-urlencoded\": {\n              \"schema\": {\n                \"properties\": {\n                  \"name\": {\n                    \"description\": \"Updated name of the pet\",\n                    \"type\": \"string\",\n                  },\n                  \"status\": {\n                    \"description\": \"Updated status of the pet\",\n                    \"type\": \"string\",\n                  },\n                },\n                \"type\": \"object\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/pet/{petId}/uploadImage\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"uploadFile\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet to update\",\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"multipart/form-data\": {\n              \"schema\": {\n                \"properties\": {\n                  \"additionalMetadata\": {\n                    \"description\": \"Additional data to pass to server\",\n                    \"type\": \"string\",\n                  },\n                  \"file\": {\n                    \"description\": \"file to upload\",\n                    \"format\": \"binary\",\n                    \"type\": \"string\",\n                  },\n                },\n                \"type\": \"object\",\n              },\n            },\n          },\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/ApiResponse\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write:pets\",\n              \"read:pets\",\n            ],\n          },\n        ],\n        \"summary\": \"uploads an image\",\n        \"tags\": [\n          \"pet\",\n        ],\n      },\n    },\n    \"/store/inventory\": {\n      \"get\": {\n        \"description\": \"Returns a map of status codes to quantities\",\n        \"operationId\": \"getInventory\",\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"additionalProperties\": {\n                    \"format\": \"int32\",\n                    \"type\": \"integer\",\n                  },\n                  \"type\": \"object\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n        },\n        \"security\": [\n          {\n            \"api_key\": [],\n          },\n        ],\n        \"summary\": \"Returns pet inventories by status\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/store/order\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/Order\",\n              },\n            },\n          },\n          \"description\": \"order placed for purchasing the pet\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\",\n          },\n        },\n        \"summary\": \"Place an order for a pet\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/store/order/{orderId}\": {\n      \"delete\": {\n        \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of the order that needs to be deleted\",\n            \"in\": \"path\",\n            \"name\": \"orderId\",\n            \"required\": true,\n            \"schema\": {\n              \"minimum\": 1,\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Order not found\",\n          },\n        },\n        \"summary\": \"Delete purchase order by ID\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"parameters\": [\n          {\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"in\": \"path\",\n            \"name\": \"orderId\",\n            \"required\": true,\n            \"schema\": {\n              \"format\": \"int64\",\n              \"maximum\": 5,\n              \"minimum\": 1,\n              \"type\": \"integer\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/Order\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\",\n          },\n          \"404\": {\n            \"description\": \"Order not found\",\n          },\n        },\n        \"summary\": \"Find purchase order by ID\",\n        \"tags\": [\n          \"store\",\n        ],\n      },\n    },\n    \"/user\": {\n      \"post\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n            },\n          },\n          \"description\": \"Created user object\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Create user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/createWithArray\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/UserArray\",\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Creates list of users with given input array\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/createWithList\": {\n      \"post\": {\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"requestBody\": {\n          \"$ref\": \"#/components/requestBodies/UserArray\",\n        },\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Creates list of users with given input array\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/login\": {\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"parameters\": [\n          {\n            \"description\": \"The user name for login\",\n            \"in\": \"query\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n          {\n            \"description\": \"The password for login in clear text\",\n            \"in\": \"query\",\n            \"name\": \"password\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"OK\",\n                  },\n                },\n                \"schema\": {\n                  \"type\": \"string\",\n                },\n              },\n              \"application/xml\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"<message> OK </message>\",\n                  },\n                },\n                \"schema\": {\n                  \"type\": \"string\",\n                },\n              },\n              \"text/plain\": {\n                \"examples\": {\n                  \"response\": {\n                    \"value\": \"OK\",\n                  },\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n            \"headers\": {\n              \"X-Expires-After\": {\n                \"description\": \"date in UTC when token expires\",\n                \"schema\": {\n                  \"format\": \"date-time\",\n                  \"type\": \"string\",\n                },\n              },\n              \"X-Rate-Limit\": {\n                \"description\": \"calls per hour allowed by the user\",\n                \"schema\": {\n                  \"format\": \"int32\",\n                  \"type\": \"integer\",\n                },\n              },\n            },\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\",\n          },\n        },\n        \"summary\": \"Logs user into the system\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/logout\": {\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\",\n          },\n        },\n        \"summary\": \"Logs out current logged in user session\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n    \"/user/{username}\": {\n      \"delete\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"parameters\": [\n          {\n            \"description\": \"The name that needs to be deleted\",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid username supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Delete user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n      \"get\": {\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"parameters\": [\n          {\n            \"description\": \"The name that needs to be fetched. Use user1 for testing. \",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"responses\": {\n          \"200\": {\n            \"content\": {\n              \"application/json\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\",\n                },\n              },\n              \"application/xml\": {\n                \"schema\": {\n                  \"$ref\": \"#/components/schemas/User\",\n                },\n              },\n            },\n            \"description\": \"successful operation\",\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Get user by user name\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n      \"put\": {\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"parameters\": [\n          {\n            \"description\": \"name that need to be deleted\",\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"required\": true,\n            \"schema\": {\n              \"type\": \"string\",\n            },\n          },\n        ],\n        \"requestBody\": {\n          \"content\": {\n            \"application/json\": {\n              \"schema\": {\n                \"$ref\": \"#/components/schemas/User\",\n              },\n            },\n          },\n          \"description\": \"Updated user object\",\n          \"required\": true,\n        },\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\",\n          },\n          \"404\": {\n            \"description\": \"User not found\",\n          },\n        },\n        \"summary\": \"Updated user\",\n        \"tags\": [\n          \"user\",\n        ],\n      },\n    },\n  },\n  \"servers\": [\n    {\n      \"description\": \"Default server\",\n      \"url\": \"//petstore.swagger.io/v2\",\n    },\n    {\n      \"description\": \"Sandbox server\",\n      \"url\": \"//petstore.swagger.io/sandbox\",\n    },\n  ],\n  \"tags\": [\n    {\n      \"description\": \"Everything about your Pets\",\n      \"name\": \"pet\",\n    },\n    {\n      \"description\": \"Access to Petstore orders\",\n      \"name\": \"store\",\n    },\n    {\n      \"description\": \"Operations about user\",\n      \"name\": \"user\",\n    },\n  ],\n  \"x-tagGroups\": [\n    {\n      \"name\": \"General\",\n      \"tags\": [\n        \"pet\",\n        \"store\",\n      ],\n    },\n    {\n      \"name\": \"User Management\",\n      \"tags\": [\n        \"user\",\n      ],\n    },\n  ],\n}\n`;\n"
  },
  {
    "path": "src/utils/__tests__/helpers.test.ts",
    "content": "import slugify from 'slugify';\nimport { appendToMdHeading, mapWithLast, mergeObjects, safeSlugify, titleize } from '../helpers';\n\ndescribe('Utils', () => {\n  describe('helpers', () => {\n    test('mapWithLast', () => {\n      const arr = [1, 2, 3];\n      const fn = (...args) => args;\n\n      const actual = mapWithLast(arr, fn);\n      const expected = [\n        [1, false],\n        [2, false],\n        [3, true],\n      ];\n      expect(actual).toEqual(expected);\n    });\n\n    test('mapWithLast for empty array', () => {\n      const arr = [];\n      const fn = (...args) => args;\n\n      const actual = mapWithLast(arr, fn);\n      const expected = [];\n      expect(actual).toEqual(expected);\n    });\n\n    test('appendToMdHeading heading exists not last', () => {\n      const val = appendToMdHeading(\n        '# Authentication\\n Hello\\n# Next heading',\n        'Authentication',\n        '<test>',\n      );\n      expect(val).toEqual('# Authentication\\n Hello\\n\\n<test>\\n\\n# Next heading');\n    });\n\n    test('appendToMdHeading heading exists last', () => {\n      const val = appendToMdHeading('# Authentication\\n Hello', 'Authentication', '<test>');\n      expect(val).toEqual('# Authentication\\n Hello\\n\\n<test>\\n');\n    });\n\n    test('appendToMdHeading empty string', () => {\n      const val = appendToMdHeading('', 'Authentication', '<test>');\n      expect(val).toEqual('# Authentication\\n\\n<test>');\n    });\n\n    test('slugifyIfAvailable returns original value when cannot slugify the value', () => {\n      const willBeSlugifed = safeSlugify('some string');\n      expect(willBeSlugifed).toEqual('some-string');\n\n      const cannotBeSlugified = '가나다라 마바사';\n      // if slugify() fixes this issue, safeSlugify should be removed and replaced with original one.\n      expect(slugify(cannotBeSlugified)).toEqual('');\n      expect(safeSlugify(cannotBeSlugified)).toEqual('가나다라-마바사');\n    });\n\n    describe('mergeObjects', () => {\n      test('should merge Objects and all nested Ones', () => {\n        const obj1 = { a: { a1: 'A1' }, c: 'C', d: {} };\n        const obj2 = { a: { a2: 'A2' }, b: { b1: 'B1' }, d: null };\n        const obj3 = { a: { a1: 'A1', a2: 'A2' }, b: { b1: 'B1' }, c: 'C', d: null };\n        expect(mergeObjects({}, obj1, obj2)).toEqual(obj3);\n      });\n      test('should behave like Object.assign on the top level', () => {\n        const obj1 = { a: { a1: 'A1' }, c: 'C' };\n        const obj2 = { a: undefined, b: { b1: 'B1' } };\n        expect(mergeObjects({}, obj1, obj2)).toEqual({ ...obj1, ...obj2 });\n      });\n      test('should not merge array values, just override', () => {\n        const obj1 = { a: ['A', 'B'] };\n        const obj2 = { a: ['C'], b: ['D'] };\n        expect(mergeObjects({}, obj1, obj2)).toEqual({ a: ['C'], b: ['D'] });\n      });\n      test('should prevent prototype pollution', () => {\n        const target = {};\n        const source = JSON.parse('{\"__proto__\": {\"polluted\": \"yes\"}}');\n\n        mergeObjects(target, source);\n\n        expect(({} as any).polluted).toBeUndefined();\n      });\n      test('should merge objects correctly', () => {\n        const target = { a: 1 };\n        const source = { b: 2 };\n\n        const result = mergeObjects(target, source);\n\n        expect(result).toEqual({ a: 1, b: 2 });\n      });\n      test('should handle nested objects', () => {\n        const target = { a: { b: 1 } };\n        const source = { a: { c: 2 } };\n\n        const result = mergeObjects(target, source);\n\n        expect(result).toEqual({ a: { b: 1, c: 2 } });\n      });\n    });\n\n    describe('titleize', () => {\n      test('should return the string with the first letter capitalized', () => {\n        expect(titleize('my title')).toEqual('My title');\n      });\n    });\n  });\n});\n"
  },
  {
    "path": "src/utils/__tests__/loadAndBundleSpec.test.ts",
    "content": "import * as yaml from 'js-yaml';\nimport { readFileSync } from 'fs';\nimport { resolve } from 'path';\nimport { loadAndBundleSpec } from '../loadAndBundleSpec';\n\ndescribe('#loadAndBundleSpec', () => {\n  it('should load And Bundle Spec demo/openapi.yaml', async () => {\n    const spec = yaml.load(readFileSync(resolve(__dirname, '../../../demo/openapi.yaml'), 'utf-8'));\n    const bundledSpec = await loadAndBundleSpec(spec);\n    expect(bundledSpec).toMatchSnapshot();\n  });\n\n  it('should load And Bundle Spec demo/openapi-3-1.yaml', async () => {\n    const spec = yaml.load(\n      readFileSync(resolve(__dirname, '../../../demo/openapi-3-1.yaml'), 'utf-8'),\n    );\n    const bundledSpec = await loadAndBundleSpec(spec);\n    expect(bundledSpec).toMatchSnapshot();\n  });\n\n  it('should load And Bundle Spec demo/swagger.yaml', async () => {\n    const spec = yaml.load(readFileSync(resolve(__dirname, '../../../demo/swagger.yaml'), 'utf-8'));\n    const bundledSpec = await loadAndBundleSpec(spec);\n    expect(bundledSpec).toMatchSnapshot();\n  });\n});\n"
  },
  {
    "path": "src/utils/__tests__/object.test.ts",
    "content": "import { objectHas, objectSet } from '../object';\n\ndescribe('object utils', () => {\n  let obj;\n\n  beforeEach(() => {\n    obj = {\n      a: {\n        b: {\n          c: {\n            d: 'd',\n          },\n          c1: 'c1',\n        },\n        b1: 'b1',\n      },\n      a1: 'a1',\n    };\n  });\n\n  describe('objectHas function', () => {\n    it('should check if the obj has path as string', () => {\n      expect(objectHas(obj, 'a.b.c')).toBeTruthy();\n      expect(objectHas(obj, 'a.b.c1')).toBeTruthy();\n      expect(objectHas(obj, 'a.b.c.d')).toBeTruthy();\n      expect(objectHas(obj, 'a.b.c1.d')).toBeFalsy();\n    });\n\n    it('should check if the obj has path as array', () => {\n      expect(objectHas(obj, ['a', 'b', 'c'])).toBeTruthy();\n      expect(objectHas(obj, ['a', 'b', 'c1'])).toBeTruthy();\n      expect(objectHas(obj, ['a', 'b', 'c', 'd'])).toBeTruthy();\n      expect(objectHas(obj, ['a', 'b', 'c1', 'd'])).toBeFalsy();\n    });\n  });\n\n  describe('objectSet function', () => {\n    it('should set value by path as string', () => {\n      expect(objectHas(obj, 'a.b.c1.d')).toBeFalsy();\n      objectSet(obj, 'a.b.c1', { d: 'd' });\n      expect(objectHas(obj, 'a.b.c1.d')).toBeTruthy();\n    });\n\n    it('should set value by path as array', () => {\n      expect(objectHas(obj, ['a', 'b', 'c1', 'd'])).toBeFalsy();\n      objectSet(obj, ['a', 'b', 'c1'], { d: 'd' });\n      expect(objectHas(obj, ['a', 'b', 'c1', 'd'])).toBeTruthy();\n    });\n  });\n});\n"
  },
  {
    "path": "src/utils/__tests__/openapi.test.ts",
    "content": "import {\n  detectType,\n  getOperationSummary,\n  getStatusCodeType,\n  humanizeConstraints,\n  isOperationName,\n  isPrimitiveType,\n  mergeParams,\n  normalizeServers,\n  pluralizeType,\n  serializeParameterValue,\n  sortByRequired,\n  humanizeNumberRange,\n  getContentWithLegacyExamples,\n  getDefinitionName,\n  langFromMime,\n} from '../';\n\nimport { FieldModel, OpenAPIParser, RedocNormalizedOptions } from '../../services';\nimport {\n  OpenAPIMediaType,\n  OpenAPIParameter,\n  OpenAPIParameterLocation,\n  OpenAPIParameterStyle,\n} from '../../types';\nimport { expandDefaultServerVariables } from '../openapi';\n\ndescribe('Utils', () => {\n  describe('openapi getStatusCode', () => {\n    it('Should return info for status codes within 100 and 200', () => {\n      expect(getStatusCodeType(100)).toEqual('info');\n      expect(getStatusCodeType(150)).toEqual('info');\n      expect(getStatusCodeType(199)).toEqual('info');\n    });\n\n    it('Should return success for status codes within 200 and 300', () => {\n      expect(getStatusCodeType(200)).toEqual('success');\n      expect(getStatusCodeType(250)).toEqual('success');\n      expect(getStatusCodeType(299)).toEqual('success');\n    });\n    it('Should return redirect for status codes within 300 and 400', () => {\n      expect(getStatusCodeType(300)).toEqual('redirect');\n      expect(getStatusCodeType(399)).toEqual('redirect');\n    });\n    it('Should return error for status codes above 400', () => {\n      expect(getStatusCodeType(400)).toEqual('error');\n      expect(getStatusCodeType(500)).toEqual('error');\n      expect(getStatusCodeType(599)).toEqual('error');\n    });\n\n    it('Should throw for incorrect HTTP code', () => {\n      expect(() => getStatusCodeType(99)).toThrow('invalid HTTP code');\n      expect(() => getStatusCodeType(600)).toThrow('invalid HTTP code');\n    });\n  });\n\n  describe('openapi isOperationName', () => {\n    it('Should return `true` for correct HTTP verbs', () => {\n      expect(isOperationName('get')).toEqual(true);\n      expect(isOperationName('post')).toEqual(true);\n      expect(isOperationName('put')).toEqual(true);\n      expect(isOperationName('head')).toEqual(true);\n      expect(isOperationName('patch')).toEqual(true);\n      expect(isOperationName('delete')).toEqual(true);\n      expect(isOperationName('options')).toEqual(true);\n    });\n\n    it('Should return `false` for incorrect HTTP verbs', () => {\n      expect(isOperationName('properties')).toEqual(false);\n      expect(isOperationName('x-name')).toEqual(false);\n      expect(isOperationName('fix')).toEqual(false);\n    });\n  });\n\n  let sixtyLetterStr = '';\n  for (let i = 0; i < 60; i++) {\n    sixtyLetterStr += 'a';\n  }\n\n  describe('openapi getOperationSummary', () => {\n    it('Should return operation self summary if exists', () => {\n      const operation = {\n        summary: 'test',\n        operationId: 'fail',\n        description: 'fail',\n      };\n      expect(getOperationSummary(operation as any)).toEqual('test');\n    });\n\n    it('Should return operationId if no summary', () => {\n      const operation = {\n        operationId: 'test',\n        description: 'fail',\n      };\n      expect(getOperationSummary(operation as any)).toEqual('test');\n    });\n\n    it('Should return description if no summary and operationId', () => {\n      const operation = {\n        description: 'test',\n      };\n      expect(getOperationSummary(operation as any)).toEqual('test');\n    });\n\n    it('Should return only first 50 description letter if no summary and operationId', () => {\n      const operation = {\n        description: sixtyLetterStr,\n      };\n      expect(sixtyLetterStr.length).toBeGreaterThan(50);\n      expect(getOperationSummary(operation as any).length).toBe(50);\n    });\n\n    it('Should return pathName if no summary, operationId, description', () => {\n      const operation = {\n        pathName: '/sandbox/test',\n      };\n      expect(getOperationSummary(operation as any)).toBe('/sandbox/test');\n    });\n\n    it('Should return <no summary> if no info', () => {\n      const operation = {\n        description: undefined,\n      };\n      expect(getOperationSummary(operation as any)).toBe('<no summary>');\n    });\n  });\n\n  describe('openapi detectType', () => {\n    it('Should detect object.type if it is specified', () => {\n      expect(\n        detectType({\n          type: 'object',\n        }),\n      ).toBe('object');\n\n      expect(\n        detectType({\n          type: 'object',\n          minimum: 1,\n        }),\n      ).toBe('object');\n    });\n\n    const tests = {\n      number: ['multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum'],\n\n      string: ['pattern', 'minLength', 'maxLength'],\n\n      array: ['items', 'maxItems', 'minItems', 'uniqueItems'],\n      object: [\n        'maxProperties',\n        'minProperties',\n        'required',\n        'additionalProperties',\n        'unevaluatedProperties',\n        'properties',\n      ],\n    };\n\n    Object.keys(tests).forEach(name => {\n      it(`Should detect ${name} if ${name} properties are present`, () => {\n        tests[name].forEach(propName => {\n          expect(\n            detectType({\n              [propName]: 0,\n            }),\n          ).toBe(name);\n        });\n      });\n    });\n  });\n\n  describe('openapi isPrimitiveType', () => {\n    it('Should return true for empty object', () => {\n      const schema = {\n        type: 'object',\n      };\n      expect(isPrimitiveType(schema)).toEqual(true);\n    });\n\n    it('Should return false for object with props', () => {\n      const schema = {\n        type: 'object',\n        properties: {\n          a: {\n            type: 'string',\n          },\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it(\"should return true for array contains object and schema hasn't properties\", () => {\n      const schema = {\n        type: ['object', 'string'],\n      };\n      expect(isPrimitiveType(schema)).toEqual(true);\n    });\n\n    it('should return false for array contains object and schema has properties', () => {\n      const schema = {\n        type: ['object', 'string'],\n        properties: {\n          a: {\n            type: 'string',\n          },\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should return false for array contains array type and schema has items', () => {\n      const schema = {\n        type: ['array'],\n        items: {\n          type: 'object',\n          additionalProperties: true,\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should return false for array contains array type and schema has items (unevaluatedProperties)', () => {\n      const schema = {\n        type: ['array'],\n        items: {\n          type: 'object',\n          unevaluatedProperties: true,\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should return false for array contains object and array types and schema has items', () => {\n      const schema = {\n        type: ['array', 'object'],\n        items: {\n          type: 'object',\n          additionalProperties: true,\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should return false for array contains object and array types and schema has items (unevaluatedProperties)', () => {\n      const schema = {\n        type: ['array', 'object'],\n        items: {\n          type: 'object',\n          unevaluatedProperties: true,\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should return false for array contains object and array types and schema has properties', () => {\n      const schema = {\n        type: ['array', 'object'],\n        properties: {\n          a: {\n            type: 'string',\n          },\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should return true for array contains array of strings', () => {\n      const schema = {\n        type: 'array',\n        items: {\n          type: 'array',\n          items: {\n            type: 'string',\n          },\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(true);\n    });\n\n    it('Should return true for array of string which include the null value', () => {\n      const schema = {\n        type: ['object', 'string', 'null'],\n      };\n      expect(isPrimitiveType(schema)).toEqual(true);\n    });\n\n    it('Should return false for array with non-empty objects', () => {\n      const schema = {\n        type: 'array',\n        items: {\n          type: 'object',\n          properties: {\n            a: {\n              type: 'string',\n            },\n          },\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should return false for object with additionalProperties', () => {\n      const schema = {\n        type: 'array',\n        items: {\n          type: 'object',\n          additionalProperties: true,\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should return false for object with unevaluatedProperties', () => {\n      const schema = {\n        type: 'array',\n        items: {\n          type: 'object',\n          unevaluatedProperties: true,\n        },\n      };\n      expect(isPrimitiveType(schema)).toEqual(false);\n    });\n\n    it('should work with externally provided type', () => {\n      const schema = {\n        properties: {\n          a: {\n            type: 'string',\n          },\n        },\n      };\n      expect(isPrimitiveType(schema, 'object')).toEqual(false);\n    });\n  });\n\n  describe('openapi mergeParams', () => {\n    it('Should deduplicate params with same \"name\" and \"in\"', () => {\n      const pathParams: OpenAPIParameter[] = [\n        {\n          name: 'param1',\n          in: 'path',\n          description: 'path',\n        },\n        {\n          name: 'param2',\n          in: 'path',\n        },\n      ];\n      const operationParams: OpenAPIParameter[] = [\n        {\n          name: 'param1',\n          in: 'path',\n          description: 'oper',\n        },\n        {\n          name: 'param2',\n          in: 'query',\n        },\n      ];\n\n      const parser = new OpenAPIParser({ openapi: '3.0' } as any);\n\n      const res = mergeParams(parser, pathParams, operationParams) as OpenAPIParameter[];\n      expect(res).toHaveLength(3);\n      expect(res[0]).toEqual(pathParams[1]);\n      expect(res[1]).toEqual(operationParams[0]);\n      expect(res[2]).toEqual(operationParams[1]);\n    });\n  });\n\n  describe('normalize servers', () => {\n    it('should make url absolute and strip spec name', () => {\n      const res = normalizeServers('http://base.com/spec.yaml', [\n        {\n          url: '/sandbox/test',\n        },\n      ]);\n      expect(res).toEqual([{ url: 'http://base.com/sandbox/test', description: '' }]);\n    });\n\n    it('should correctly resolve url with server relative path', () => {\n      const res = normalizeServers('http://base.com/subpath/spec.yaml', [\n        {\n          url: '/sandbox/test',\n        },\n      ]);\n      expect(res).toEqual([{ url: 'http://base.com/sandbox/test', description: '' }]);\n    });\n\n    it('should correctly resolve url with relative path', () => {\n      const res = normalizeServers('http://base.com/subpath/spec.yaml', [\n        {\n          url: 'sandbox/test',\n        },\n      ]);\n      expect(res).toEqual([{ url: 'http://base.com/subpath/sandbox/test', description: '' }]);\n    });\n\n    it('should prefer server host over spec`s one', () => {\n      const res = normalizeServers('http://base.com/spec.yaml', [\n        {\n          url: 'https://otherbase.com/sandbox/test',\n        },\n      ]);\n      expect(res).toEqual([{ url: 'https://otherbase.com/sandbox/test', description: '' }]);\n    });\n\n    it('should strip trailing slash', () => {\n      const res = normalizeServers('', [\n        {\n          url: 'https://otherbase.com/sandbox/test/',\n        },\n      ]);\n      expect(res).toEqual([{ url: 'https://otherbase.com/sandbox/test', description: '' }]);\n    });\n\n    it('should set correct protocol', () => {\n      const res = normalizeServers('https://base.com', [\n        {\n          url: '//base.com/sandbox/test',\n          description: 'test',\n        },\n      ]);\n      expect(res).toEqual([{ url: 'https://base.com/sandbox/test', description: 'test' }]);\n    });\n\n    it('should remove query string and hash from url', () => {\n      const originalWindow = { ...window };\n      const windowSpy: jest.SpyInstance = jest.spyOn(global, 'window', 'get');\n      windowSpy.mockImplementation(() => ({\n        ...originalWindow,\n        location: {\n          ...originalWindow.location,\n          href: 'https://base.com/subpath/?param=value#tag',\n        },\n      }));\n      const res = normalizeServers(undefined, [\n        {\n          url: 'sandbox/test',\n        },\n      ]);\n      expect(res).toEqual([{ url: 'https://base.com/subpath/sandbox/test', description: '' }]);\n    });\n\n    it('should expand variables', () => {\n      const servers = normalizeServers('', [\n        {\n          url: 'http://{host}{basePath}',\n          variables: {\n            host: {\n              default: '127.0.0.1',\n            },\n            basePath: {\n              default: '/path/to/endpoint',\n            },\n          },\n        },\n        {\n          url: 'http://127.0.0.2:{port}',\n          variables: {},\n        },\n        {\n          url: 'http://127.0.0.3',\n        },\n      ]);\n\n      expect(expandDefaultServerVariables(servers[0].url, servers[0].variables)).toEqual(\n        'http://127.0.0.1/path/to/endpoint',\n      );\n      expect(expandDefaultServerVariables(servers[1].url, servers[1].variables)).toEqual(\n        'http://127.0.0.2:{port}',\n      );\n      expect(expandDefaultServerVariables(servers[2].url, servers[2].variables)).toEqual(\n        'http://127.0.0.3',\n      );\n    });\n  });\n\n  describe('openapi humanizeNumberRange', () => {\n    it('should return `>=` when only minimum value present or exclusiveMinimum = false', () => {\n      const expected = '>= 0';\n      expect(humanizeNumberRange({ minimum: 0 })).toEqual(expected);\n      expect(humanizeNumberRange({ minimum: 0, exclusiveMinimum: false })).toEqual(expected);\n    });\n\n    it('should return `>` when minimum value present and exclusiveMinimum set to true', () => {\n      expect(humanizeNumberRange({ minimum: 0, exclusiveMinimum: true })).toEqual('> 0');\n    });\n\n    it('should return `<=` when only maximum value present or exclusiveMinimum = false', () => {\n      const expected = '<= 10';\n      expect(humanizeNumberRange({ maximum: 10 })).toEqual(expected);\n      expect(humanizeNumberRange({ maximum: 10, exclusiveMaximum: false })).toEqual(expected);\n    });\n\n    it('should return `<` when maximum value present and exclusiveMaximum set to true', () => {\n      expect(humanizeNumberRange({ maximum: 10, exclusiveMaximum: true })).toEqual('< 10');\n    });\n\n    it('should return correct range for minimum and maximum values and with different exclusive set', () => {\n      expect(humanizeNumberRange({ minimum: 0, maximum: 10 })).toEqual('[ 0 .. 10 ]');\n      expect(\n        humanizeNumberRange({\n          minimum: 0,\n          exclusiveMinimum: true,\n          maximum: 10,\n          exclusiveMaximum: true,\n        }),\n      ).toEqual('( 0 .. 10 )');\n      expect(\n        humanizeNumberRange({\n          minimum: 0,\n          maximum: 10,\n          exclusiveMaximum: true,\n        }),\n      ).toEqual('[ 0 .. 10 )');\n      expect(\n        humanizeNumberRange({\n          minimum: 0,\n          exclusiveMinimum: true,\n          maximum: 10,\n        }),\n      ).toEqual('( 0 .. 10 ]');\n    });\n\n    it('should return correct range exclusive values only', () => {\n      expect(humanizeNumberRange({ exclusiveMinimum: 0 })).toEqual('> 0');\n      expect(humanizeNumberRange({ exclusiveMaximum: 10 })).toEqual('< 10');\n      expect(humanizeNumberRange({ exclusiveMinimum: 0, exclusiveMaximum: 10 })).toEqual(\n        '( 0 .. 10 )',\n      );\n    });\n\n    it('should return correct min value', () => {\n      expect(humanizeNumberRange({ minimum: 5, exclusiveMinimum: 10 })).toEqual('> 5');\n      expect(humanizeNumberRange({ minimum: -5, exclusiveMinimum: -10 })).toEqual('> -10');\n    });\n\n    it('should return correct max value', () => {\n      expect(humanizeNumberRange({ maximum: 10, exclusiveMaximum: 15 })).toEqual('< 15');\n      expect(humanizeNumberRange({ maximum: -10, exclusiveMaximum: -15 })).toEqual('< -10');\n    });\n\n    it('should return undefined', () => {\n      expect(humanizeNumberRange({})).toEqual(undefined);\n    });\n  });\n\n  describe('openapi humanizeConstraints', () => {\n    const itemConstraintSchema = (\n      min?: number,\n      max?: number,\n      multipleOf?: number,\n      uniqueItems?: boolean,\n    ) => ({ type: 'array', minItems: min, maxItems: max, multipleOf, uniqueItems });\n\n    it('should not have a humanized constraint without schema constraints', () => {\n      expect(humanizeConstraints(itemConstraintSchema())).toHaveLength(0);\n    });\n\n    it('should have a humanized constraint when minItems is set', () => {\n      expect(humanizeConstraints(itemConstraintSchema(2))).toContain('>= 2 items');\n    });\n\n    it('should have a humanized constraint when maxItems is set', () => {\n      expect(humanizeConstraints(itemConstraintSchema(undefined, 8))).toContain('<= 8 items');\n    });\n\n    it('should have a humanized constraint when minItems and maxItems are both set', () => {\n      expect(humanizeConstraints(itemConstraintSchema(2, 8))).toContain('[ 2 .. 8 ] items');\n    });\n\n    it('should have a humanized constraint when minItems and maxItems are the same', () => {\n      expect(humanizeConstraints(itemConstraintSchema(7, 7))).toContain('= 7 items');\n    });\n\n    it('should have a humanized constraint when justMinItems is set, and it is equal to 1', () => {\n      expect(humanizeConstraints(itemConstraintSchema(1))).toContain('non-empty');\n    });\n\n    it('should have a humanized constraint when multipleOf is set, and it is in format of /^0\\\\.0*1$/', () => {\n      expect(humanizeConstraints(itemConstraintSchema(undefined, undefined, 0.01))).toContain(\n        'decimal places <= 2',\n      );\n    });\n\n    it('should have a humanized constraint when multipleOf is set, and it is in format other than /^0\\\\.0*1$/', () => {\n      expect(humanizeConstraints(itemConstraintSchema(undefined, undefined, 0.5))).toContain(\n        'multiple of 0.5',\n      );\n    });\n\n    it('should have a humanized constraint when uniqueItems is set', () => {\n      expect(\n        humanizeConstraints(itemConstraintSchema(undefined, undefined, undefined, true)),\n      ).toContain('unique');\n    });\n  });\n\n  describe('OpenAPI pluralizeType', () => {\n    it('should pluralize all simple types', () => {\n      expect(pluralizeType('string')).toEqual('strings');\n      expect(pluralizeType('number')).toEqual('numbers');\n      expect(pluralizeType('object')).toEqual('objects');\n      expect(pluralizeType('integer')).toEqual('integers');\n      expect(pluralizeType('boolean')).toEqual('booleans');\n      expect(pluralizeType('array')).toEqual('arrays');\n    });\n\n    it('should pluralize complex display types', () => {\n      expect(pluralizeType('object (Pet)')).toEqual('objects (Pet)');\n      expect(pluralizeType('string <email>')).toEqual('strings <email>');\n    });\n\n    it('should pluralize oneOf-ed display types', () => {\n      expect(pluralizeType('object or string')).toEqual('objects or strings');\n      expect(pluralizeType('object (Pet) or number <int64>')).toEqual(\n        'objects (Pet) or numbers <int64>',\n      );\n    });\n\n    it('should not pluralize display types that are already pluralized', () => {\n      expect(pluralizeType('strings')).toEqual('strings');\n      expect(pluralizeType('objects (Pet)')).toEqual('objects (Pet)');\n      expect(pluralizeType('strings <email>')).toEqual('strings <email>');\n      expect(pluralizeType('objects or strings')).toEqual('objects or strings');\n      expect(pluralizeType('objects (Pet) or numbers <int64>')).toEqual(\n        'objects (Pet) or numbers <int64>',\n      );\n    });\n  });\n\n  describe('openapi serializeParameter', () => {\n    interface TestCase {\n      style: OpenAPIParameterStyle;\n      explode: boolean;\n      expected: string;\n    }\n\n    interface TestValueTypeGroup {\n      value: any;\n      description: string;\n      cases: TestCase[];\n    }\n    interface TestLocationGroup {\n      location: OpenAPIParameterLocation;\n      name: string;\n      description: string;\n      cases: TestValueTypeGroup[];\n    }\n    const testCases: TestLocationGroup[] = [\n      {\n        location: 'path',\n        name: 'id',\n        description: 'path parameters',\n        cases: [\n          {\n            value: 5,\n            description: 'primitive values',\n            cases: [\n              { style: 'simple', explode: false, expected: '5' },\n              { style: 'simple', explode: true, expected: '5' },\n              { style: 'label', explode: false, expected: '.5' },\n              { style: 'label', explode: true, expected: '.5' },\n              { style: 'matrix', explode: false, expected: ';id=5' },\n              { style: 'matrix', explode: true, expected: ';id=5' },\n            ],\n          },\n          {\n            value: [3, 4, 5],\n            description: 'array values',\n            cases: [\n              { style: 'simple', explode: false, expected: '3,4,5' },\n              { style: 'simple', explode: true, expected: '3,4,5' },\n              { style: 'label', explode: false, expected: '.3,4,5' },\n              { style: 'label', explode: true, expected: '.3.4.5' },\n              { style: 'matrix', explode: false, expected: ';id=3,4,5' },\n              { style: 'matrix', explode: true, expected: ';id=3;id=4;id=5' },\n            ],\n          },\n          {\n            value: { role: 'admin', firstName: 'Alex' },\n            description: 'object values',\n            cases: [\n              { style: 'simple', explode: false, expected: 'role,admin,firstName,Alex' },\n              { style: 'simple', explode: true, expected: 'role=admin,firstName=Alex' },\n              { style: 'label', explode: false, expected: '.role,admin,firstName,Alex' },\n              { style: 'label', explode: true, expected: '.role=admin.firstName=Alex' },\n              { style: 'matrix', explode: false, expected: ';id=role,admin,firstName,Alex' },\n              { style: 'matrix', explode: true, expected: ';role=admin;firstName=Alex' },\n            ],\n          },\n        ],\n      },\n      {\n        location: 'query',\n        name: 'id',\n        description: 'query parameters',\n        cases: [\n          {\n            value: 5,\n            description: 'primitive values',\n            cases: [\n              { style: 'form', explode: true, expected: 'id=5' },\n              { style: 'form', explode: false, expected: 'id=5' },\n            ],\n          },\n          {\n            value: [3, 4, 5],\n            description: 'array values',\n            cases: [\n              { style: 'form', explode: true, expected: 'id=3&id=4&id=5' },\n              { style: 'form', explode: false, expected: 'id=3,4,5' },\n              { style: 'spaceDelimited', explode: true, expected: 'id=3&id=4&id=5' },\n              { style: 'spaceDelimited', explode: false, expected: 'id=3%204%205' },\n              { style: 'pipeDelimited', explode: true, expected: 'id=3&id=4&id=5' },\n              { style: 'pipeDelimited', explode: false, expected: 'id=3|4|5' },\n            ],\n          },\n          {\n            value: { role: 'admin', firstName: 'Alex' },\n            description: 'object values',\n            cases: [\n              { style: 'form', explode: true, expected: 'role=admin&firstName=Alex' },\n              { style: 'form', explode: false, expected: 'id=role,admin,firstName,Alex' },\n              { style: 'deepObject', explode: true, expected: 'id[role]=admin&id[firstName]=Alex' },\n            ],\n          },\n        ],\n      },\n      {\n        location: 'cookie',\n        name: 'id',\n        description: 'cookie parameters',\n        cases: [\n          {\n            value: 5,\n            description: 'primitive values',\n            cases: [\n              { style: 'form', explode: true, expected: 'id=5' },\n              { style: 'form', explode: false, expected: 'id=5' },\n            ],\n          },\n          {\n            value: [3, 4, 5],\n            description: 'array values',\n            cases: [\n              { style: 'form', explode: true, expected: 'id=3&id=4&id=5' },\n              { style: 'form', explode: false, expected: 'id=3,4,5' },\n            ],\n          },\n          {\n            value: { role: 'admin', firstName: 'Alex' },\n            description: 'object values',\n            cases: [\n              { style: 'form', explode: true, expected: 'role=admin&firstName=Alex' },\n              { style: 'form', explode: false, expected: 'id=role,admin,firstName,Alex' },\n            ],\n          },\n        ],\n      },\n      {\n        location: 'header',\n        name: 'x-id',\n        description: 'header parameters',\n        cases: [\n          {\n            value: 5,\n            description: 'primitive values',\n            cases: [\n              { style: 'simple', explode: false, expected: '5' },\n              { style: 'simple', explode: true, expected: '5' },\n            ],\n          },\n          {\n            value: [3, 4, 5],\n            description: 'array values',\n            cases: [\n              { style: 'simple', explode: false, expected: '3,4,5' },\n              { style: 'simple', explode: true, expected: '3,4,5' },\n            ],\n          },\n          {\n            value: { role: 'admin', firstName: 'Alex' },\n            description: 'object values',\n            cases: [\n              { style: 'simple', explode: false, expected: 'role,admin,firstName,Alex' },\n              { style: 'simple', explode: true, expected: 'role=admin,firstName=Alex' },\n            ],\n          },\n        ],\n      },\n    ];\n\n    testCases.forEach(locationTestGroup => {\n      describe(locationTestGroup.description, () => {\n        locationTestGroup.cases.forEach(valueTypeTestGroup => {\n          describe(valueTypeTestGroup.description, () => {\n            valueTypeTestGroup.cases.forEach(testCase => {\n              it(`should serialize correctly when style is ${testCase.style} and explode is ${testCase.explode}`, () => {\n                const parameter: OpenAPIParameter = {\n                  name: locationTestGroup.name,\n                  in: locationTestGroup.location,\n                  style: testCase.style,\n                  explode: testCase.explode,\n                };\n                const serialized = serializeParameterValue(parameter, valueTypeTestGroup.value);\n\n                expect(serialized).toEqual(testCase.expected);\n              });\n            });\n          });\n        });\n      });\n    });\n\n    describe('advanced serialization', () => {\n      it('should serialize correctly query parameter with content with application/json', () => {\n        const parameter: OpenAPIParameter = {\n          name: 'id',\n          in: 'query',\n          content: {\n            'application/json': {\n              schema: {\n                type: 'string',\n              },\n            },\n          },\n        };\n\n        const parser = new OpenAPIParser({ openapi: '3.0' } as any);\n        const opts = new RedocNormalizedOptions({});\n\n        const field = new FieldModel(parser, parameter, '', opts);\n        expect(serializeParameterValue(field, { name: 'test', age: 23 })).toEqual(\n          'id={\"name\":\"test\",\"age\":23}',\n        );\n      });\n\n      it('should serialize correctly header parameter with content with application/json', () => {\n        const parameter: OpenAPIParameter = {\n          name: 'x-header',\n          in: 'header',\n          content: {\n            'application/json': {\n              schema: {\n                type: 'string',\n              },\n            },\n          },\n        };\n\n        const parser = new OpenAPIParser({ openapi: '3.0' } as any);\n        const opts = new RedocNormalizedOptions({});\n\n        const field = new FieldModel(parser, parameter, '', opts);\n        expect(serializeParameterValue(field, { name: 'test', age: 23 })).toEqual(\n          '{\"name\":\"test\",\"age\":23}',\n        );\n      });\n    });\n  });\n\n  describe('OpenAPI sortByRequired', () => {\n    it('should equal to the old data when all items have no required props', () => {\n      const fields = [\n        {\n          name: 'loginName',\n          required: false,\n        },\n        {\n          name: 'displayName',\n          required: false,\n        },\n        {\n          name: 'email',\n          required: false,\n        },\n        {\n          name: 'space',\n          required: false,\n        },\n        {\n          name: 'type',\n          required: false,\n        },\n        {\n          name: 'depIds',\n          required: false,\n        },\n        {\n          name: 'depNames',\n          required: false,\n        },\n        {\n          name: 'password',\n          required: false,\n        },\n        {\n          name: 'pwdControl',\n          required: false,\n        },\n        {\n          name: 'csfLevel',\n          required: false,\n        },\n        {\n          name: 'priority',\n          required: false,\n        },\n        {\n          name: 'siteId',\n          required: false,\n        },\n      ];\n      expect(sortByRequired(fields as FieldModel[])).toEqual(fields);\n    });\n\n    it('other item should be the same order when some of items are required', () => {\n      const fields = [\n        {\n          name: 'loginName',\n          required: true,\n        },\n        {\n          name: 'displayName',\n          required: false,\n        },\n        {\n          name: 'email',\n          required: true,\n        },\n        {\n          name: 'space',\n          required: false,\n        },\n        {\n          name: 'type',\n          required: false,\n        },\n        {\n          name: 'depIds',\n          required: false,\n        },\n        {\n          name: 'depNames',\n          required: false,\n        },\n        {\n          name: 'password',\n          required: false,\n        },\n        {\n          name: 'pwdControl',\n          required: false,\n        },\n        {\n          name: 'csfLevel',\n          required: false,\n        },\n        {\n          name: 'priority',\n          required: false,\n        },\n        {\n          name: 'siteId',\n          required: false,\n        },\n      ];\n      const sortedFields = [\n        {\n          name: 'loginName',\n          required: true,\n        },\n        {\n          name: 'email',\n          required: true,\n        },\n        {\n          name: 'displayName',\n          required: false,\n        },\n        {\n          name: 'space',\n          required: false,\n        },\n        {\n          name: 'type',\n          required: false,\n        },\n        {\n          name: 'depIds',\n          required: false,\n        },\n        {\n          name: 'depNames',\n          required: false,\n        },\n        {\n          name: 'password',\n          required: false,\n        },\n        {\n          name: 'pwdControl',\n          required: false,\n        },\n        {\n          name: 'csfLevel',\n          required: false,\n        },\n        {\n          name: 'priority',\n          required: false,\n        },\n        {\n          name: 'siteId',\n          required: false,\n        },\n      ];\n      expect(sortByRequired(fields as FieldModel[])).toEqual(sortedFields);\n    });\n\n    it('should the order of required items is as same as the order parameter ', () => {\n      const fields = [\n        {\n          name: 'loginName',\n          required: true,\n        },\n        {\n          name: 'displayName',\n          required: true,\n        },\n        {\n          name: 'email',\n          required: true,\n        },\n        {\n          name: 'space',\n          required: false,\n        },\n        {\n          name: 'type',\n          required: false,\n        },\n        {\n          name: 'depIds',\n          required: false,\n        },\n        {\n          name: 'depNames',\n          required: false,\n        },\n        {\n          name: 'password',\n          required: false,\n        },\n        {\n          name: 'pwdControl',\n          required: false,\n        },\n        {\n          name: 'csfLevel',\n          required: false,\n        },\n        {\n          name: 'priority',\n          required: false,\n        },\n        {\n          name: 'siteId',\n          required: false,\n        },\n      ];\n      expect(\n        sortByRequired(fields as FieldModel[], ['siteId', 'displayName', 'loginName', 'email']),\n      ).toEqual([\n        {\n          name: 'displayName',\n          required: true,\n        },\n        {\n          name: 'loginName',\n          required: true,\n        },\n        {\n          name: 'email',\n          required: true,\n        },\n        {\n          name: 'space',\n          required: false,\n        },\n        {\n          name: 'type',\n          required: false,\n        },\n        {\n          name: 'depIds',\n          required: false,\n        },\n        {\n          name: 'depNames',\n          required: false,\n        },\n        {\n          name: 'password',\n          required: false,\n        },\n        {\n          name: 'pwdControl',\n          required: false,\n        },\n        {\n          name: 'csfLevel',\n          required: false,\n        },\n        {\n          name: 'priority',\n          required: false,\n        },\n        {\n          name: 'siteId',\n          required: false,\n        },\n      ]);\n      expect(sortByRequired(fields as FieldModel[], ['email', 'displayName'])).toEqual([\n        {\n          name: 'email',\n          required: true,\n        },\n        {\n          name: 'displayName',\n          required: true,\n        },\n        {\n          name: 'loginName',\n          required: true,\n        },\n        {\n          name: 'space',\n          required: false,\n        },\n        {\n          name: 'type',\n          required: false,\n        },\n        {\n          name: 'depIds',\n          required: false,\n        },\n        {\n          name: 'depNames',\n          required: false,\n        },\n        {\n          name: 'password',\n          required: false,\n        },\n        {\n          name: 'pwdControl',\n          required: false,\n        },\n        {\n          name: 'csfLevel',\n          required: false,\n        },\n        {\n          name: 'priority',\n          required: false,\n        },\n        {\n          name: 'siteId',\n          required: false,\n        },\n      ]);\n\n      expect(sortByRequired(fields as FieldModel[], ['displayName'])).toEqual([\n        {\n          name: 'displayName',\n          required: true,\n        },\n        {\n          name: 'loginName',\n          required: true,\n        },\n        {\n          name: 'email',\n          required: true,\n        },\n        {\n          name: 'space',\n          required: false,\n        },\n        {\n          name: 'type',\n          required: false,\n        },\n        {\n          name: 'depIds',\n          required: false,\n        },\n        {\n          name: 'depNames',\n          required: false,\n        },\n        {\n          name: 'password',\n          required: false,\n        },\n        {\n          name: 'pwdControl',\n          required: false,\n        },\n        {\n          name: 'csfLevel',\n          required: false,\n        },\n        {\n          name: 'priority',\n          required: false,\n        },\n        {\n          name: 'siteId',\n          required: false,\n        },\n      ]);\n    });\n  });\n\n  describe('OpenAPI getContentWithLegacyExamples', () => {\n    it('should return undefined if no x-examples/x-example and no content', () => {\n      expect(getContentWithLegacyExamples({})).toBeUndefined();\n    });\n\n    it('should return unmodified object if no x-examples or x-example', () => {\n      const info = {\n        content: {\n          'application/json': {},\n        },\n      };\n\n      const content = getContentWithLegacyExamples(info);\n      expect(content).toStrictEqual(info.content);\n    });\n\n    it('should create a new content object if no content and x-examples', () => {\n      const info = {\n        'x-examples': {\n          'application/json': {\n            name: {\n              value: 'test',\n            },\n          },\n        },\n      };\n\n      const content = getContentWithLegacyExamples(info);\n      expect(content).toEqual({\n        'application/json': {\n          examples: {\n            name: {\n              value: 'test',\n            },\n          },\n        },\n      });\n    });\n\n    it('should create a new content object if no content and x-example', () => {\n      const info = {\n        'x-example': {\n          'application/json': 'test',\n        },\n      };\n\n      const content = getContentWithLegacyExamples(info);\n      expect(content).toEqual({\n        'application/json': { example: 'test' },\n      });\n    });\n\n    it('should return copy of content with injected x-example', () => {\n      const info = {\n        'x-example': {\n          'application/json': 'test',\n        },\n        content: {\n          'application/json': {\n            schema: { type: 'string' },\n          },\n          'text/plain': { schema: { type: 'string' } },\n        },\n      };\n\n      const content = getContentWithLegacyExamples(info) as { [mime: string]: OpenAPIMediaType };\n      expect(content).toEqual({\n        'application/json': { schema: { type: 'string' }, example: 'test' },\n        'text/plain': { schema: { type: 'string' } },\n      });\n      expect(content).not.toStrictEqual(info.content);\n      expect(content['application/json']).not.toStrictEqual(info.content['application/json']);\n      expect(content['text/plain']).toStrictEqual(info.content['text/plain']);\n    });\n\n    it('should prefer x-examples over x-example', () => {\n      const info = {\n        'x-example': {\n          'application/json': 'test',\n        },\n        'x-examples': {\n          'application/json': { name: { value: 'test' } },\n        },\n        content: {\n          'application/json': {\n            schema: { type: 'string' },\n          },\n          'text/plain': { schema: { type: 'string' } },\n        },\n      };\n\n      const content = getContentWithLegacyExamples(info) as { [mime: string]: OpenAPIMediaType };\n      expect(content).toEqual({\n        'application/json': { schema: { type: 'string' }, examples: { name: { value: 'test' } } },\n        'text/plain': { schema: { type: 'string' } },\n      });\n      expect(content).not.toStrictEqual(info.content);\n      expect(content['application/json']).not.toStrictEqual(info.content['application/json']);\n      expect(content['text/plain']).toStrictEqual(info.content['text/plain']);\n    });\n  });\n\n  describe('getDefinitionName', () => {\n    test('should return the name if pointer match regex', () => {\n      expect(getDefinitionName('#/components/schemas/Call')).toEqual('Call');\n    });\n    test(\"should return the `undefined` if pointer not match regex or it's absent\", () => {\n      expect(getDefinitionName('#/test/path/Call')).toBeUndefined();\n      expect(getDefinitionName()).toBeUndefined();\n    });\n  });\n\n  describe('langFromMime', () => {\n    test('should return correct lang name from content type', () => {\n      expect(langFromMime('application/xml')).toEqual('xml');\n      expect(langFromMime('application/x-xml')).toEqual('xml');\n      expect(langFromMime('application/csv')).toEqual('csv');\n      expect(langFromMime('application/x-csv')).toEqual('csv');\n      expect(langFromMime('text/plain')).toEqual('tex');\n      expect(langFromMime('text/x-plain')).toEqual('tex');\n      expect(langFromMime('application/plain')).toEqual('tex');\n\n      expect(langFromMime('text/some-type')).toEqual('clike');\n    });\n  });\n});\n"
  },
  {
    "path": "src/utils/debug.ts",
    "content": "export function debugTime(label: string) {\n  if (process.env.NODE_ENV !== 'production') {\n    console.time(label);\n  }\n}\n\nexport function debugTimeEnd(label: string) {\n  if (process.env.NODE_ENV !== 'production') {\n    console.timeEnd(label);\n  }\n}\n"
  },
  {
    "path": "src/utils/decorators.ts",
    "content": "function throttle(func, wait) {\n  let context;\n  let args;\n  let result;\n  let timeout: any = null;\n  let previous = 0;\n  const later = () => {\n    previous = new Date().getTime();\n    timeout = null;\n    result = func.apply(context, args);\n    if (!timeout) {\n      context = args = null;\n    }\n  };\n  return function () {\n    const now = new Date().getTime();\n    const remaining = wait - (now - previous);\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    context = this;\n    // eslint-disable-next-line prefer-rest-params\n    args = arguments;\n    if (remaining <= 0 || remaining > wait) {\n      if (timeout) {\n        clearTimeout(timeout);\n        timeout = null;\n      }\n      previous = now;\n      result = func.apply(context, args);\n      if (!timeout) {\n        context = args = null;\n      }\n    } else if (!timeout) {\n      timeout = setTimeout(later, remaining);\n    }\n    return result;\n  };\n}\n\nexport function Throttle(delay: number) {\n  return (_, _2, desc: PropertyDescriptor) => {\n    desc.value = throttle(desc.value, delay);\n  };\n}\n"
  },
  {
    "path": "src/utils/dom.ts",
    "content": "export const IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;\n\nexport function querySelector(selector: string): Element | null {\n  if (typeof document !== 'undefined') {\n    return document.querySelector(selector);\n  }\n  return null;\n}\n\n/**\n * Drop everything inside <...> (i.e., tags/elements), and keep the text.\n * Unlike browser innerText, this removes newlines; it also doesn't handle\n * un-encoded `<` or `>` characters very well, so don't feed it malformed HTML\n */\nexport function html2Str(html: string): string {\n  return html\n    .split(/<[^>]+>/)\n    .map(chunk => {\n      return chunk.trim();\n    })\n    .filter(trimmedChunk => {\n      return trimmedChunk.length > 0;\n    })\n    .join(' ');\n}\n\n// Alternate scrollIntoViewIfNeeded implementation.\n// Used in all cases, since it seems Chrome's implementation is buggy\n// when \"Experimental Web Platform Features\" is enabled (at least of version 96).\n// See #1714, #1742\n\nexport function scrollIntoViewIfNeeded(el: HTMLElement, centerIfNeeded = true) {\n  const parent = el.parentNode as HTMLElement | null;\n  if (!parent) {\n    return;\n  }\n  const parentComputedStyle = window.getComputedStyle(parent, undefined);\n  const parentBorderTopWidth = parseInt(\n    parentComputedStyle.getPropertyValue('border-top-width'),\n    10,\n  );\n  const parentBorderLeftWidth = parseInt(\n    parentComputedStyle.getPropertyValue('border-left-width'),\n    10,\n  );\n  const overTop = el.offsetTop - parent.offsetTop < parent.scrollTop;\n  const overBottom =\n    el.offsetTop - parent.offsetTop + el.clientHeight - parentBorderTopWidth >\n    parent.scrollTop + parent.clientHeight;\n  const overLeft = el.offsetLeft - parent.offsetLeft < parent.scrollLeft;\n  const overRight =\n    el.offsetLeft - parent.offsetLeft + el.clientWidth - parentBorderLeftWidth >\n    parent.scrollLeft + parent.clientWidth;\n  const alignWithTop = overTop && !overBottom;\n\n  if ((overTop || overBottom) && centerIfNeeded) {\n    parent.scrollTop =\n      el.offsetTop -\n      parent.offsetTop -\n      parent.clientHeight / 2 -\n      parentBorderTopWidth +\n      el.clientHeight / 2;\n  }\n\n  if ((overLeft || overRight) && centerIfNeeded) {\n    parent.scrollLeft =\n      el.offsetLeft -\n      parent.offsetLeft -\n      parent.clientWidth / 2 -\n      parentBorderLeftWidth +\n      el.clientWidth / 2;\n  }\n\n  if ((overTop || overBottom || overLeft || overRight) && !centerIfNeeded) {\n    el.scrollIntoView(alignWithTop);\n  }\n}\n"
  },
  {
    "path": "src/utils/helpers.ts",
    "content": "import slugify from 'slugify';\n\n/**\n * Maps over array passing `isLast` bool to iterator as the second argument\n */\nexport function mapWithLast<T, P>(array: T[], iteratee: (item: T, isLast: boolean) => P) {\n  const res: P[] = [];\n  for (let i = 0; i < array.length - 1; i++) {\n    res.push(iteratee(array[i], false));\n  }\n  if (array.length !== 0) {\n    res.push(iteratee(array[array.length - 1], true));\n  }\n  return res;\n}\n\n/**\n * Creates an object with the same keys as object and values generated by running each\n * own enumerable string keyed property of object thru iteratee.\n * The iteratee is invoked with three arguments: (value, key, object).\n *\n * @param object the object to iterate over\n * @param iteratee the function invoked per iteration.\n */\nexport function mapValues<T, P>(\n  object: Record<string, T>,\n  iteratee: (val: T, key: string, obj: Record<string, T>) => P,\n): Record<string, P> {\n  const res: { [key: string]: P } = {};\n  for (const key in object) {\n    if (object.hasOwnProperty(key)) {\n      res[key] = iteratee(object[key], key, object);\n    }\n  }\n  return res;\n}\n\n/**\n * flattens collection using `prop` field as a children\n * @param collectionItems collection items\n * @param prop item property with child elements\n */\nexport function flattenByProp<T extends object, P extends keyof T>(\n  collectionItems: T[],\n  prop: P,\n): T[] {\n  const res: T[] = [];\n  const iterate = (items: T[]) => {\n    for (const item of items) {\n      res.push(item);\n      if (item[prop]) {\n        iterate(item[prop] as any as T[]);\n      }\n    }\n  };\n  iterate(collectionItems);\n  return res;\n}\n\nexport function stripTrailingSlash(path: string): string {\n  if (path.endsWith('/')) {\n    return path.substring(0, path.length - 1);\n  }\n  return path;\n}\n\nexport function isNumeric(n: any): n is number {\n  return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\nexport function appendToMdHeading(md: string, heading: string, content: string) {\n  // if  heading is already in md and append to the end of it\n  const testRegex = new RegExp(`(^|\\\\n)#\\\\s?${heading}\\\\s*\\\\n`, 'i');\n  const replaceRegex = new RegExp(`((\\\\n|^)#\\\\s*${heading}\\\\s*(\\\\n|$)(?:.|\\\\n)*?)(\\\\n#|$)`, 'i');\n  if (testRegex.test(md)) {\n    return md.replace(replaceRegex, `$1\\n\\n${content}\\n$4`);\n  } else {\n    // else append heading itself\n    const br = md === '' || md.endsWith('\\n\\n') ? '' : md.endsWith('\\n') ? '\\n' : '\\n\\n';\n    return `${md}${br}# ${heading}\\n\\n${content}`;\n  }\n}\n\nexport const mergeObjects = (target: any, ...sources: any[]): any => {\n  if (!sources.length) {\n    return target;\n  }\n  const source = sources.shift();\n  if (source === undefined) {\n    return target;\n  }\n\n  if (isMergebleObject(target) && isMergebleObject(source)) {\n    Object.keys(source).forEach((key: string) => {\n      if (Object.prototype.hasOwnProperty.call(source, key) && key !== '__proto__') {\n        if (isMergebleObject(source[key])) {\n          if (!target[key]) {\n            target[key] = {};\n          }\n          mergeObjects(target[key], source[key]);\n        } else {\n          target[key] = source[key];\n        }\n      }\n    });\n  }\n\n  return mergeObjects(target, ...sources);\n};\n\nexport const isObject = (item: unknown): item is Record<string, unknown> => {\n  return item !== null && typeof item === 'object';\n};\n\nconst isMergebleObject = (item): boolean => {\n  return isObject(item) && !isArray(item);\n};\n\n/**\n * slugify() returns empty string when failed to slugify.\n * so try to return minimum slugified-string with failed one which keeps original value\n * the regex codes are referenced with https://gist.github.com/mathewbyrne/1280286\n */\nexport function safeSlugify(value: string): string {\n  return (\n    slugify(value) ||\n    value\n      .toString()\n      .toLowerCase()\n      .replace(/\\s+/g, '-') // Replace spaces with -\n      .replace(/&/g, '-and-') // Replace & with 'and'\n      .replace(/\\--+/g, '-') // Replace multiple - with single -\n      .replace(/^-+/, '') // Trim - from start of text\n      .replace(/-+$/, '')\n  ); // Trim - from end of text\n}\n\nexport function isAbsoluteUrl(url: string) {\n  return /(?:^[a-z][a-z0-9+.-]*:|\\/\\/)/i.test(url);\n}\n\n/**\n * simple resolve URL which doesn't break on strings with url fragments\n * e.g. resolveUrl('http://test.com:{port}', 'path') results in http://test.com:{port}/path\n */\nexport function resolveUrl(url: string, to: string) {\n  let res;\n  if (to.startsWith('//')) {\n    try {\n      res = `${new URL(url).protocol || 'https:'}${to}`;\n    } catch {\n      res = `https:${to}`;\n    }\n  } else if (isAbsoluteUrl(to)) {\n    res = to;\n  } else if (!to.startsWith('/')) {\n    res = stripTrailingSlash(url) + '/' + to;\n  } else {\n    try {\n      const urlObj = new URL(url);\n      urlObj.pathname = to;\n      res = urlObj.href;\n    } catch {\n      res = to;\n    }\n  }\n  return stripTrailingSlash(res);\n}\n\nexport function getBasePath(serverUrl: string): string {\n  try {\n    return parseURL(serverUrl).pathname;\n  } catch (e) {\n    // when using with redoc-cli serverUrl can be empty resulting in crash\n    return serverUrl;\n  }\n}\n\nexport function titleize(text: string) {\n  return text.charAt(0).toUpperCase() + text.slice(1);\n}\n\nexport function removeQueryStringAndHash(serverUrl: string): string {\n  try {\n    const url = parseURL(serverUrl);\n    url.search = '';\n    url.hash = '';\n    return url.toString();\n  } catch (e) {\n    // when using with redoc-cli serverUrl can be empty resulting in crash\n    return serverUrl;\n  }\n}\n\nfunction parseURL(url: string) {\n  if (typeof URL === 'undefined') {\n    // node\n    return new (require('url').URL)(url);\n  } else {\n    return new URL(url);\n  }\n}\n\nexport function escapeHTMLAttrChars(str: string): string {\n  return str.replace(/[\"\\\\]/g, '\\\\$&');\n}\n\nexport function unescapeHTMLChars(str: string): string {\n  return str\n    .replace(/&#(\\d+);/g, (_m, code) => String.fromCharCode(parseInt(code, 10)))\n    .replace(/&amp;/g, '&')\n    .replace(/&quot;/g, '\"');\n}\n\nexport function isArray(value: unknown): value is any[] {\n  return Array.isArray(value);\n}\n\nexport function isBoolean(value: unknown): value is boolean {\n  return typeof value === 'boolean';\n}\n"
  },
  {
    "path": "src/utils/highlight.ts",
    "content": "import * as Prism from 'prismjs';\nimport 'prismjs/components/prism-bash.js';\nimport 'prismjs/components/prism-c.js';\nimport 'prismjs/components/prism-clike.js';\nimport 'prismjs/components/prism-coffeescript.js';\nimport 'prismjs/components/prism-cpp.js';\nimport 'prismjs/components/prism-csharp.js';\nimport 'prismjs/components/prism-go.js';\nimport 'prismjs/components/prism-http.js';\nimport 'prismjs/components/prism-java.js';\nimport 'prismjs/components/prism-lua.js';\nimport 'prismjs/components/prism-markup-templating.js'; // dep of php\nimport 'prismjs/components/prism-markup.js'; // xml\nimport 'prismjs/components/prism-objectivec.js';\nimport 'prismjs/components/prism-perl.js';\nimport 'prismjs/components/prism-php.js';\nimport 'prismjs/components/prism-python.js';\nimport 'prismjs/components/prism-q.js';\nimport 'prismjs/components/prism-ruby.js';\nimport 'prismjs/components/prism-scala.js';\nimport 'prismjs/components/prism-sql.js';\nimport 'prismjs/components/prism-swift.js';\nimport 'prismjs/components/prism-yaml.js';\nimport 'prismjs/components/prism-csv.js';\n\nconst DEFAULT_LANG = 'clike';\n\nPrism.languages.insertBefore(\n  'javascript',\n  'string',\n  {\n    'property string': {\n      pattern: /([{,]\\s*)\"(?:\\\\.|[^\\\\\"\\r\\n])*\"(?=\\s*:)/i,\n      lookbehind: true,\n    },\n  } as any,\n  undefined as any,\n);\n\nPrism.languages.insertBefore(\n  'javascript',\n  'punctuation',\n  {\n    property: {\n      pattern: /([{,]\\s*)[a-z]\\w*(?=\\s*:)/i,\n      lookbehind: true,\n    },\n  },\n  undefined as any,\n);\n\n/**\n * map language names to Prism.js names\n */\nexport function mapLang(lang: string): string {\n  return (\n    {\n      json: 'js',\n      'c++': 'cpp',\n      'c#': 'csharp',\n      'objective-c': 'objectivec',\n      shell: 'bash',\n      viml: 'vim',\n    }[lang] || DEFAULT_LANG\n  );\n}\n\n/**\n * Highlight source code string using Prism.js\n * @param source source code to highlight\n * @param lang highlight language\n * @return highlighted source code as **html string**\n */\nexport function highlight(source: string | number | boolean, lang: string = DEFAULT_LANG): string {\n  lang = lang.toLowerCase();\n  let grammar = Prism.languages[lang];\n  if (!grammar) {\n    grammar = Prism.languages[mapLang(lang)];\n  }\n  return Prism.highlight(source.toString(), grammar, lang);\n}\n"
  },
  {
    "path": "src/utils/index.ts",
    "content": "export * from './JsonPointer';\n\nexport * from './openapi';\nexport * from './helpers';\nexport * from './highlight';\nexport * from './loadAndBundleSpec';\nexport * from './dom';\nexport * from './decorators';\nexport * from './debug';\nexport * from './memoize';\nexport * from './sort';\n"
  },
  {
    "path": "src/utils/jsonToHtml.ts",
    "content": "let level = 1;\n\nexport function jsonToHTML(json, maxExpandLevel) {\n  level = 1;\n  let output = '';\n  output += '<div class=\"redoc-json\">';\n  output += '<code>';\n  output += valueToHTML(json, maxExpandLevel);\n  output += '</code>';\n  output += '</div>';\n  return output;\n}\n\nfunction htmlEncode(t) {\n  return t !== undefined\n    ? t\n        .toString()\n        .replace(/&/g, '&amp;')\n        .replace(/\"/g, '&quot;')\n        .replace(/</g, '&lt;')\n        .replace(/>/g, '&gt;')\n    : '';\n}\n\nfunction stringifyStringLiteral(str: string) {\n  return JSON.stringify(str).slice(1, -1);\n}\n\nfunction decorateWithSpan(value, className) {\n  return '<span class=\"' + className + '\">' + htmlEncode(value) + '</span>';\n}\n\nfunction punctuation(val) {\n  return '<span class=\"token punctuation\">' + val + '</span>';\n}\n\nfunction valueToHTML(value, maxExpandLevel: number) {\n  const valueType = typeof value;\n  let output = '';\n  if (value === undefined || value === null) {\n    output += decorateWithSpan('null', 'token keyword');\n  } else if (value && value.constructor === Array) {\n    level++;\n    output += arrayToHTML(value, maxExpandLevel);\n    level--;\n  } else if (value && value.constructor === Date) {\n    output += decorateWithSpan('\"' + value.toISOString() + '\"', 'token string');\n  } else if (valueType === 'object') {\n    level++;\n    output += objectToHTML(value, maxExpandLevel);\n    level--;\n  } else if (valueType === 'number') {\n    output += decorateWithSpan(value, 'token number');\n  } else if (valueType === 'string') {\n    if (/^(http|https):\\/\\/[^\\s]+$/.test(value)) {\n      output +=\n        decorateWithSpan('\"', 'token string') +\n        '<a href=\"' +\n        encodeURI(value) +\n        '\">' +\n        htmlEncode(stringifyStringLiteral(value)) +\n        '</a>' +\n        decorateWithSpan('\"', 'token string');\n    } else {\n      output += decorateWithSpan('\"' + stringifyStringLiteral(value) + '\"', 'token string');\n    }\n  } else if (valueType === 'boolean') {\n    output += decorateWithSpan(value, 'token boolean');\n  }\n\n  return output;\n}\n\nfunction arrayToHTML(json, maxExpandLevel: number) {\n  const collapsed = level > maxExpandLevel ? 'collapsed' : '';\n  let output = `<button class=\"collapser\" aria-label=\"${\n    level > maxExpandLevel + 1 ? 'expand' : 'collapse'\n  }\"></button>${punctuation('[')}<span class=\"ellipsis\"></span><ul class=\"array collapsible\">`;\n  let hasContents = false;\n  const length = json.length;\n  for (let i = 0; i < length; i++) {\n    hasContents = true;\n    output += '<li><div class=\"hoverable ' + collapsed + '\">';\n    output += valueToHTML(json[i], maxExpandLevel);\n    if (i < length - 1) {\n      output += ',';\n    }\n    output += '</div></li>';\n  }\n  output += `</ul>${punctuation(']')}`;\n  if (!hasContents) {\n    output = punctuation('[ ]');\n  }\n  return output;\n}\n\nfunction objectToHTML(json, maxExpandLevel: number) {\n  const collapsed = level > maxExpandLevel ? 'collapsed' : '';\n  const keys = Object.keys(json);\n  const length = keys.length;\n  let output = `<button class=\"collapser\" aria-label=\"${\n    level > maxExpandLevel + 1 ? 'expand' : 'collapse'\n  }\"></button>${punctuation('{')}<span class=\"ellipsis\"></span><ul class=\"obj collapsible\">`;\n  let hasContents = false;\n  for (let i = 0; i < length; i++) {\n    const key = keys[i];\n    hasContents = true;\n    output += '<li><div class=\"hoverable ' + collapsed + '\">';\n    output += '<span class=\"property token string\">\"' + htmlEncode(key) + '\"</span>: ';\n    output += valueToHTML(json[key], maxExpandLevel);\n    if (i < length - 1) {\n      output += punctuation(',');\n    }\n    output += '</div></li>';\n  }\n  output += `</ul>${punctuation('}')}`;\n  if (!hasContents) {\n    output = punctuation('{ }');\n  }\n  return output;\n}\n"
  },
  {
    "path": "src/utils/loadAndBundleSpec.ts",
    "content": "import type { Source, Document } from '@redocly/openapi-core';\n// eslint-disable-next-line import/no-internal-modules\nimport type { ResolvedConfig } from '@redocly/openapi-core/lib/config';\n\n// eslint-disable-next-line import/no-internal-modules\nimport { bundle } from '@redocly/openapi-core/lib/bundle';\n// eslint-disable-next-line import/no-internal-modules\nimport { Config } from '@redocly/openapi-core/lib/config/config';\n\n/* tslint:disable-next-line:no-implicit-dependencies */\nimport { convertObj } from 'swagger2openapi';\nimport { OpenAPISpec } from '../types';\nimport { IS_BROWSER } from './dom';\n\nexport async function loadAndBundleSpec(specUrlOrObject: object | string): Promise<OpenAPISpec> {\n  const config = new Config({} as ResolvedConfig);\n  const bundleOpts = {\n    config,\n    base: IS_BROWSER ? window.location.href : process.cwd(),\n  };\n\n  if (IS_BROWSER) {\n    config.resolve.http.customFetch = global.fetch;\n  }\n\n  if (typeof specUrlOrObject === 'object' && specUrlOrObject !== null) {\n    bundleOpts['doc'] = {\n      source: { absoluteRef: '' } as Source,\n      parsed: specUrlOrObject,\n    } as Document;\n  } else {\n    bundleOpts['ref'] = specUrlOrObject;\n  }\n\n  const {\n    bundle: { parsed },\n  } = await bundle(bundleOpts);\n  return parsed.swagger !== undefined ? convertSwagger2OpenAPI(parsed) : parsed;\n}\n\nexport function convertSwagger2OpenAPI(spec: any): Promise<OpenAPISpec> {\n  console.warn('[ReDoc Compatibility mode]: Converting OpenAPI 2.0 to OpenAPI 3.0');\n  return new Promise<OpenAPISpec>((resolve, reject) =>\n    convertObj(spec, { patch: true, warnOnly: true, text: '{}', anchors: true }, (err, res) => {\n      // TODO: log any warnings\n      if (err) {\n        return reject(err);\n      }\n      resolve(res && (res.openapi as any));\n    }),\n  );\n}\n"
  },
  {
    "path": "src/utils/memoize.ts",
    "content": "// source: https://github.com/andreypopp/memoize-decorator\nconst SENTINEL = {};\n\nexport function memoize<T>(target: any, name: string, descriptor: TypedPropertyDescriptor<T>) {\n  if (typeof descriptor.value === 'function') {\n    return _memoizeMethod(target, name, descriptor) as any as TypedPropertyDescriptor<T>;\n  } else if (typeof descriptor.get === 'function') {\n    return _memoizeGetter(target, name, descriptor) as TypedPropertyDescriptor<T>;\n  } else {\n    throw new Error(\n      '@memoize decorator can be applied to methods or getters, got ' +\n        String(descriptor.value) +\n        ' instead',\n    );\n  }\n}\n\nfunction _memoizeGetter(target: any, name: string, descriptor: PropertyDescriptor) {\n  const memoizedName = `_memoized_${name}`;\n  const get = descriptor.get!;\n  target[memoizedName] = SENTINEL;\n  return {\n    ...descriptor,\n    get() {\n      if (this[memoizedName] === SENTINEL) {\n        this[memoizedName] = get.call(this);\n      }\n      return this[memoizedName];\n    },\n  };\n}\n\nfunction _memoizeMethod<T>(target: any, name: string, descriptor: TypedPropertyDescriptor<T>) {\n  if (!descriptor.value || (descriptor.value as any).length > 0) {\n    throw new Error('@memoize decorator can only be applied to methods of zero arguments');\n  }\n  const memoizedName = `_memoized_${name}`;\n  const value = descriptor.value;\n  target[memoizedName] = SENTINEL;\n  return {\n    ...descriptor,\n    value() {\n      if (this[memoizedName] === SENTINEL) {\n        this[memoizedName] = (value as any).call(this);\n      }\n      return this[memoizedName] as any;\n    },\n  };\n}\n"
  },
  {
    "path": "src/utils/object.ts",
    "content": "export function objectHas(object: object, path: string | Array<string>): boolean {\n  let _path = <Array<string>>path;\n\n  if (typeof path === 'string') {\n    _path = path.split('.');\n  }\n\n  return _path.every((key: string) => {\n    if (typeof object != 'object' || object === null || !(key in object)) return false;\n    object = object[key];\n    return true;\n  });\n}\n\nexport function objectSet(object: object, path: string | Array<string>, value: any): void {\n  let _path = <Array<string>>path;\n\n  if (typeof path === 'string') {\n    _path = path.split('.');\n  }\n  const limit = _path.length - 1;\n  for (let i = 0; i < limit; ++i) {\n    const key = _path[i];\n    object = object[key] ?? (object[key] = {});\n  }\n  const key = _path[limit];\n  object[key] = value;\n}\n"
  },
  {
    "path": "src/utils/openapi.ts",
    "content": "import { dirname } from 'path';\nimport * as URLtemplate from 'url-template';\n\nimport { ExtendedOpenAPIOperation } from '../services';\nimport { FieldModel } from '../services/models';\nimport { OpenAPIParser } from '../services/OpenAPIParser';\nimport {\n  OpenAPIEncoding,\n  OpenAPIMediaType,\n  OpenAPIParameter,\n  OpenAPIParameterStyle,\n  OpenAPIRequestBody,\n  OpenAPIResponse,\n  OpenAPISchema,\n  OpenAPIServer,\n  Referenced,\n} from '../types';\nimport { IS_BROWSER } from './dom';\nimport { isNumeric, removeQueryStringAndHash, resolveUrl, isArray, isBoolean } from './helpers';\n\nfunction isWildcardStatusCode(statusCode: string | number): statusCode is string {\n  return typeof statusCode === 'string' && /\\dxx/i.test(statusCode);\n}\n\nexport function isStatusCode(statusCode: string) {\n  return statusCode === 'default' || isNumeric(statusCode) || isWildcardStatusCode(statusCode);\n}\n\nexport function getStatusCodeType(statusCode: string | number, defaultAsError = false): string {\n  if (statusCode === 'default') {\n    return defaultAsError ? 'error' : 'success';\n  }\n\n  let code = typeof statusCode === 'string' ? parseInt(statusCode, 10) : statusCode;\n  if (isWildcardStatusCode(statusCode)) {\n    code *= 100; // parseInt('2xx') parses to 2\n  }\n\n  if (code < 100 || code > 599) {\n    throw new Error('invalid HTTP code');\n  }\n  let res = 'success';\n  if (code >= 300 && code < 400) {\n    res = 'redirect';\n  } else if (code >= 400) {\n    res = 'error';\n  } else if (code < 200) {\n    res = 'info';\n  }\n  return res;\n}\n\nconst operationNames = {\n  get: true,\n  post: true,\n  put: true,\n  head: true,\n  patch: true,\n  delete: true,\n  options: true,\n  $ref: true,\n};\n\nexport function isOperationName(key: string): boolean {\n  return key in operationNames;\n}\n\nexport function getOperationSummary(operation: ExtendedOpenAPIOperation): string {\n  return (\n    operation.summary ||\n    operation.operationId ||\n    (operation.description && operation.description.substring(0, 50)) ||\n    operation.pathName ||\n    '<no summary>'\n  );\n}\n\nconst schemaKeywordTypes = {\n  multipleOf: 'number',\n  maximum: 'number',\n  exclusiveMaximum: 'number',\n  minimum: 'number',\n  exclusiveMinimum: 'number',\n\n  maxLength: 'string',\n  minLength: 'string',\n  pattern: 'string',\n  contentEncoding: 'string',\n  contentMediaType: 'string',\n\n  items: 'array',\n  maxItems: 'array',\n  minItems: 'array',\n  uniqueItems: 'array',\n\n  maxProperties: 'object',\n  minProperties: 'object',\n  required: 'object',\n  additionalProperties: 'object',\n  unevaluatedProperties: 'object',\n  properties: 'object',\n  patternProperties: 'object',\n};\n\nexport function detectType(schema: OpenAPISchema): string {\n  if (schema.type !== undefined && !isArray(schema.type)) {\n    return schema.type;\n  }\n  const keywords = Object.keys(schemaKeywordTypes);\n  for (const keyword of keywords) {\n    const type = schemaKeywordTypes[keyword];\n    if (schema[keyword] !== undefined) {\n      return type;\n    }\n  }\n\n  return 'any';\n}\n\nexport function isPrimitiveType(\n  schema: OpenAPISchema,\n  type: string | string[] | undefined = schema.type,\n) {\n  if (schema['x-circular-ref']) {\n    return true;\n  }\n\n  if (schema.oneOf !== undefined || schema.anyOf !== undefined) {\n    return false;\n  }\n\n  if ((schema.if && schema.then) || (schema.if && schema.else)) {\n    return false;\n  }\n\n  let isPrimitive = true;\n  const isArrayType = isArray(type);\n\n  if (type === 'object' || (isArrayType && type?.includes('object'))) {\n    isPrimitive =\n      schema.properties !== undefined\n        ? Object.keys(schema.properties).length === 0\n        : schema.additionalProperties === undefined &&\n          schema.unevaluatedProperties === undefined &&\n          schema.patternProperties === undefined;\n  }\n\n  if (isArray(schema.items) || isArray(schema.prefixItems)) {\n    return false;\n  }\n\n  if (\n    schema.items !== undefined &&\n    !isBoolean(schema.items) &&\n    (type === 'array' || (isArrayType && type?.includes('array')))\n  ) {\n    isPrimitive = isPrimitiveType(schema.items, schema.items.type);\n  }\n\n  return isPrimitive;\n}\n\nexport function isJsonLike(contentType: string): boolean {\n  return contentType.search(/json/i) !== -1;\n}\n\nexport function isFormUrlEncoded(contentType: string): boolean {\n  return contentType === 'application/x-www-form-urlencoded';\n}\n\nfunction delimitedEncodeField(fieldVal: any, fieldName: string, delimiter: string): string {\n  if (isArray(fieldVal)) {\n    return fieldVal.map(v => v.toString()).join(delimiter);\n  } else if (typeof fieldVal === 'object') {\n    return Object.keys(fieldVal)\n      .map(k => `${k}${delimiter}${fieldVal[k]}`)\n      .join(delimiter);\n  } else {\n    return fieldName + '=' + fieldVal.toString();\n  }\n}\n\nfunction deepObjectEncodeField(fieldVal: any, fieldName: string): string {\n  if (isArray(fieldVal)) {\n    console.warn('deepObject style cannot be used with array value:' + fieldVal.toString());\n    return '';\n  } else if (typeof fieldVal === 'object') {\n    return Object.keys(fieldVal)\n      .map(k => `${fieldName}[${k}]=${fieldVal[k]}`)\n      .join('&');\n  } else {\n    console.warn('deepObject style cannot be used with non-object value:' + fieldVal.toString());\n    return '';\n  }\n}\n\nfunction serializeFormValue(name: string, explode: boolean, value: any) {\n  // Use RFC6570 safe name ([a-zA-Z0-9_]) and replace with our name later\n  // e.g. URI.template doesn't parse names with hyphen (-) which are valid query param names\n  const safeName = '__redoc_param_name__';\n  const suffix = explode ? '*' : '';\n  const template = URLtemplate.parse(`{?${safeName}${suffix}}`);\n  return template\n    .expand({ [safeName]: value })\n    .substring(1)\n    .replace(/__redoc_param_name__/g, name);\n}\n\n/*\n * Should be used only for url-form-encoded body payloads\n * To be used for parameters should be extended with other style values\n */\nexport function urlFormEncodePayload(\n  payload: object,\n  encoding: { [field: string]: OpenAPIEncoding } = {},\n) {\n  if (isArray(payload)) {\n    throw new Error('Payload must have fields: ' + payload.toString());\n  } else {\n    return Object.keys(payload)\n      .map(fieldName => {\n        const fieldVal = payload[fieldName];\n        const { style = 'form', explode = true } = encoding[fieldName] || {};\n        switch (style) {\n          case 'form':\n            return serializeFormValue(fieldName, explode, fieldVal);\n          case 'spaceDelimited':\n            return delimitedEncodeField(fieldVal, fieldName, '%20');\n          case 'pipeDelimited':\n            return delimitedEncodeField(fieldVal, fieldName, '|');\n          case 'deepObject':\n            return deepObjectEncodeField(fieldVal, fieldName);\n          default:\n            // TODO implement rest of styles for path parameters\n            console.warn('Incorrect or unsupported encoding style: ' + style);\n            return '';\n        }\n      })\n      .join('&');\n  }\n}\n\nfunction serializePathParameter(\n  name: string,\n  style: OpenAPIParameterStyle,\n  explode: boolean,\n  value: any,\n): string {\n  const suffix = explode ? '*' : '';\n  let prefix = '';\n\n  if (style === 'label') {\n    prefix = '.';\n  } else if (style === 'matrix') {\n    prefix = ';';\n  }\n\n  // Use RFC6570 safe name ([a-zA-Z0-9_]) and replace with our name later\n  // e.g. URI.template doesn't parse names with hyphen (-) which are valid query param names\n  const safeName = '__redoc_param_name__';\n  const template = URLtemplate.parse(`{${prefix}${safeName}${suffix}}`);\n\n  return template.expand({ [safeName]: value }).replace(/__redoc_param_name__/g, name);\n}\n\nfunction serializeQueryParameter(\n  name: string,\n  style: OpenAPIParameterStyle,\n  explode: boolean,\n  value: any,\n): string {\n  switch (style) {\n    case 'form':\n      return serializeFormValue(name, explode, value);\n    case 'spaceDelimited':\n      if (!isArray(value)) {\n        console.warn('The style spaceDelimited is only applicable to arrays');\n        return '';\n      }\n      if (explode) {\n        return serializeFormValue(name, explode, value);\n      }\n\n      return `${name}=${value.join('%20')}`;\n    case 'pipeDelimited':\n      if (!isArray(value)) {\n        console.warn('The style pipeDelimited is only applicable to arrays');\n        return '';\n      }\n      if (explode) {\n        return serializeFormValue(name, explode, value);\n      }\n\n      return `${name}=${value.join('|')}`;\n    case 'deepObject':\n      if (!explode || isArray(value) || typeof value !== 'object') {\n        console.warn('The style deepObject is only applicable for objects with explode=true');\n        return '';\n      }\n\n      return deepObjectEncodeField(value, name);\n    default:\n      console.warn('Unexpected style for query: ' + style);\n      return '';\n  }\n}\n\nfunction serializeHeaderParameter(\n  style: OpenAPIParameterStyle,\n  explode: boolean,\n  value: any,\n): string {\n  switch (style) {\n    case 'simple':\n      const suffix = explode ? '*' : '';\n\n      // name is not important here, so use RFC6570 safe name ([a-zA-Z0-9_])\n      const name = '__redoc_param_name__';\n      const template = URLtemplate.parse(`{${name}${suffix}}`);\n      return decodeURIComponent(template.expand({ [name]: value }));\n    default:\n      console.warn('Unexpected style for header: ' + style);\n      return '';\n  }\n}\n\nfunction serializeCookieParameter(\n  name: string,\n  style: OpenAPIParameterStyle,\n  explode: boolean,\n  value: any,\n): string {\n  switch (style) {\n    case 'form':\n      return serializeFormValue(name, explode, value);\n    default:\n      console.warn('Unexpected style for cookie: ' + style);\n      return '';\n  }\n}\n\nexport function serializeParameterValueWithMime(value: any, mime: string): string {\n  if (isJsonLike(mime)) {\n    return JSON.stringify(value);\n  } else {\n    console.warn(`Parameter serialization as ${mime} is not supported`);\n    return '';\n  }\n}\n\nexport function serializeParameterValue(\n  parameter: (OpenAPIParameter & { serializationMime?: string }) | FieldModel,\n  value: any,\n): string {\n  const { name, style, explode = false, serializationMime } = parameter;\n\n  if (serializationMime) {\n    switch (parameter.in) {\n      case 'path':\n      case 'header':\n        return serializeParameterValueWithMime(value, serializationMime);\n      case 'cookie':\n      case 'query':\n        return `${name}=${serializeParameterValueWithMime(value, serializationMime)}`;\n      default:\n        console.warn('Unexpected parameter location: ' + parameter.in);\n        return '';\n    }\n  }\n\n  if (!style) {\n    console.warn(`Missing style attribute or content for parameter ${name}`);\n    return '';\n  }\n\n  switch (parameter.in) {\n    case 'path':\n      return serializePathParameter(name, style, explode, value);\n    case 'query':\n      return serializeQueryParameter(name, style, explode, value);\n    case 'header':\n      return serializeHeaderParameter(style, explode, value);\n    case 'cookie':\n      return serializeCookieParameter(name, style, explode, value);\n    default:\n      console.warn('Unexpected parameter location: ' + parameter.in);\n      return '';\n  }\n}\n\nexport function getSerializedValue(field: FieldModel, example: any) {\n  if (field.in) {\n    // decode for better readability in examples: see https://github.com/Redocly/redoc/issues/1138\n    return decodeURIComponent(serializeParameterValue(field, example));\n  } else {\n    return typeof example === 'object' ? example : String(example);\n  }\n}\n\nexport function langFromMime(contentType: string): string {\n  if (contentType.search(/xml/i) !== -1) {\n    return 'xml';\n  }\n\n  if (contentType.search(/csv/i) !== -1) {\n    return 'csv';\n  }\n\n  if (contentType.search(/plain/i) !== -1) {\n    return 'tex';\n  }\n\n  return 'clike';\n}\n\nconst DEFINITION_NAME_REGEX = /^#\\/components\\/(schemas|pathItems)\\/([^/]+)$/;\n\nexport function isNamedDefinition(pointer?: string): boolean {\n  return DEFINITION_NAME_REGEX.test(pointer || '');\n}\n\nexport function getDefinitionName(pointer?: string): string | undefined {\n  const [name] = pointer?.match(DEFINITION_NAME_REGEX)?.reverse() || [];\n  return name;\n}\n\nfunction humanizeMultipleOfConstraint(multipleOf: number | undefined): string | undefined {\n  if (multipleOf === undefined) {\n    return;\n  }\n  const strigifiedMultipleOf = multipleOf.toString(10);\n  if (!/^0\\.0*1$/.test(strigifiedMultipleOf)) {\n    return `multiple of ${strigifiedMultipleOf}`;\n  }\n  return `decimal places <= ${strigifiedMultipleOf.split('.')[1].length}`;\n}\n\nfunction humanizeRangeConstraint(\n  description: string,\n  min: number | undefined,\n  max: number | undefined,\n): string | undefined {\n  let stringRange;\n  if (min !== undefined && max !== undefined) {\n    if (min === max) {\n      stringRange = `= ${min} ${description}`;\n    } else {\n      stringRange = `[ ${min} .. ${max} ] ${description}`;\n    }\n  } else if (max !== undefined) {\n    stringRange = `<= ${max} ${description}`;\n  } else if (min !== undefined) {\n    if (min === 1) {\n      stringRange = 'non-empty';\n    } else {\n      stringRange = `>= ${min} ${description}`;\n    }\n  }\n\n  return stringRange;\n}\n\nexport function humanizeNumberRange(schema: OpenAPISchema): string | undefined {\n  const minimum =\n    typeof schema.exclusiveMinimum === 'number'\n      ? Math.min(schema.exclusiveMinimum, schema.minimum ?? Infinity)\n      : schema.minimum;\n  const maximum =\n    typeof schema.exclusiveMaximum === 'number'\n      ? Math.max(schema.exclusiveMaximum, schema.maximum ?? -Infinity)\n      : schema.maximum;\n  const exclusiveMinimum = typeof schema.exclusiveMinimum === 'number' || schema.exclusiveMinimum;\n  const exclusiveMaximum = typeof schema.exclusiveMaximum === 'number' || schema.exclusiveMaximum;\n\n  if (minimum !== undefined && maximum !== undefined) {\n    return `${exclusiveMinimum ? '( ' : '[ '}${minimum} .. ${maximum}${\n      exclusiveMaximum ? ' )' : ' ]'\n    }`;\n  } else if (maximum !== undefined) {\n    return `${exclusiveMaximum ? '< ' : '<= '}${maximum}`;\n  } else if (minimum !== undefined) {\n    return `${exclusiveMinimum ? '> ' : '>= '}${minimum}`;\n  }\n}\n\nexport function humanizeConstraints(schema: OpenAPISchema): string[] {\n  const res: string[] = [];\n\n  const stringRange = humanizeRangeConstraint('characters', schema.minLength, schema.maxLength);\n  if (stringRange !== undefined) {\n    res.push(stringRange);\n  }\n\n  const arrayRange = humanizeRangeConstraint('items', schema.minItems, schema.maxItems);\n  if (arrayRange !== undefined) {\n    res.push(arrayRange);\n  }\n\n  const propertiesRange = humanizeRangeConstraint(\n    'properties',\n    schema.minProperties,\n    schema.maxProperties,\n  );\n  if (propertiesRange !== undefined) {\n    res.push(propertiesRange);\n  }\n\n  const multipleOfConstraint = humanizeMultipleOfConstraint(schema.multipleOf);\n  if (multipleOfConstraint !== undefined) {\n    res.push(multipleOfConstraint);\n  }\n\n  const numberRange = humanizeNumberRange(schema);\n  if (numberRange !== undefined) {\n    res.push(numberRange);\n  }\n\n  if (schema.uniqueItems) {\n    res.push('unique');\n  }\n\n  return res;\n}\n\nexport function sortByRequired(fields: FieldModel[], order: string[] = []) {\n  const unrequiredFields: FieldModel[] = [];\n  const orderedFields: FieldModel[] = [];\n  const unorderedFields: FieldModel[] = [];\n\n  fields.forEach(field => {\n    if (field.required) {\n      order.includes(field.name) ? orderedFields.push(field) : unorderedFields.push(field);\n    } else {\n      unrequiredFields.push(field);\n    }\n  });\n\n  orderedFields.sort((a, b) => order.indexOf(a.name) - order.indexOf(b.name));\n\n  return [...orderedFields, ...unorderedFields, ...unrequiredFields];\n}\n\nexport function sortByField(\n  fields: FieldModel[],\n  param: keyof Pick<FieldModel, 'name' | 'description' | 'kind'>,\n) {\n  return [...fields].sort((a, b) => {\n    return a[param].localeCompare(b[param]);\n  });\n}\n\nexport function mergeParams(\n  parser: OpenAPIParser,\n  pathParams: Array<Referenced<OpenAPIParameter>> = [],\n  operationParams: Array<Referenced<OpenAPIParameter>> = [],\n): Array<Referenced<OpenAPIParameter>> {\n  const operationParamNames = {};\n  operationParams.forEach(param => {\n    ({ resolved: param } = parser.deref(param));\n    operationParamNames[param.name + '_' + param.in] = true;\n  });\n\n  // filter out path params overridden by operation ones with the same name\n  pathParams = pathParams.filter(param => {\n    ({ resolved: param } = parser.deref(param));\n    return !operationParamNames[param.name + '_' + param.in];\n  });\n\n  return pathParams.concat(operationParams);\n}\n\nexport function mergeSimilarMediaTypes(\n  types: Record<string, OpenAPIMediaType>,\n): Record<string, OpenAPIMediaType> {\n  const mergedTypes = {};\n  Object.keys(types).forEach(name => {\n    const mime = types[name];\n    // ignore content type parameters (e.g. charset) and merge\n    const normalizedMimeName = name.split(';')[0].trim();\n    if (!mergedTypes[normalizedMimeName]) {\n      mergedTypes[normalizedMimeName] = mime;\n      return;\n    }\n    mergedTypes[normalizedMimeName] = { ...mergedTypes[normalizedMimeName], ...mime };\n  });\n\n  return mergedTypes;\n}\n\nexport function expandDefaultServerVariables(url: string, variables: object = {}) {\n  return url.replace(\n    /(?:{)([\\w-.]+)(?:})/g,\n    (match, name) => (variables[name] && variables[name].default) || match,\n  );\n}\n\nexport function normalizeServers(\n  specUrl: string | undefined,\n  servers: OpenAPIServer[],\n): OpenAPIServer[] {\n  const getHref = () => {\n    if (!IS_BROWSER) {\n      return '';\n    }\n    const href = window.location.href;\n    return href.endsWith('.html') ? dirname(href) : href;\n  };\n\n  const baseUrl = specUrl === undefined ? removeQueryStringAndHash(getHref()) : dirname(specUrl);\n\n  if (servers.length === 0) {\n    // Behaviour defined in OpenAPI spec: https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#openapi-object\n    servers = [\n      {\n        url: '/',\n      },\n    ];\n  }\n\n  function normalizeUrl(url: string): string {\n    return resolveUrl(baseUrl, url);\n  }\n\n  return servers.map(server => {\n    return {\n      ...server,\n      url: normalizeUrl(server.url),\n      description: server.description || '',\n    };\n  });\n}\n\nexport const SECURITY_DEFINITIONS_JSX_NAME = 'SecurityDefinitions';\nexport const OLD_SECURITY_DEFINITIONS_JSX_NAME = 'security-definitions';\nexport const SCHEMA_DEFINITION_JSX_NAME = 'SchemaDefinition';\n\nexport let SECURITY_SCHEMES_SECTION_PREFIX = 'section/Authentication/';\nexport function setSecuritySchemePrefix(prefix: string) {\n  SECURITY_SCHEMES_SECTION_PREFIX = prefix;\n}\n\nexport const shortenHTTPVerb = verb =>\n  ({\n    delete: 'del',\n    options: 'opts',\n  }[verb] || verb);\n\nexport function isRedocExtension(key: string): boolean {\n  const redocExtensions = {\n    'x-circular-ref': true,\n    'x-parentRefs': true,\n    'x-refsStack': true,\n    'x-code-samples': true, // deprecated\n    'x-codeSamples': true,\n    'x-displayName': true,\n    'x-examples': true,\n    'x-enumDescriptions': true,\n    'x-logo': true,\n    'x-nullable': true,\n    'x-servers': true,\n    'x-tagGroups': true,\n    'x-traitTag': true,\n    'x-badges': true,\n    'x-additionalPropertiesName': true,\n    'x-explicitMappingOnly': true,\n  };\n\n  return key in redocExtensions;\n}\n\nexport function extractExtensions(\n  obj: object,\n  showExtensions: string[] | true,\n): Record<string, any> {\n  return Object.keys(obj)\n    .filter(key => {\n      if (showExtensions === true) {\n        return key.startsWith('x-') && !isRedocExtension(key);\n      }\n      return key.startsWith('x-') && showExtensions.indexOf(key) > -1;\n    })\n    .reduce((acc, key) => {\n      acc[key] = obj[key];\n      return acc;\n    }, {});\n}\n\nexport function pluralizeType(displayType: string): string {\n  return displayType\n    .split(' or ')\n    .map(type => type.replace(/^(string|object|number|integer|array|boolean)s?( ?.*)/, '$1s$2'))\n    .join(' or ');\n}\n\nexport function getContentWithLegacyExamples(\n  info: OpenAPIRequestBody | OpenAPIResponse,\n): { [mime: string]: OpenAPIMediaType } | undefined {\n  let mediaContent = info.content;\n  const xExamples = info['x-examples']; // converted from OAS2 body param\n  const xExample = info['x-example']; // converted from OAS2 body param\n\n  if (xExamples) {\n    mediaContent = { ...mediaContent };\n    for (const mime of Object.keys(xExamples)) {\n      const examples = xExamples[mime];\n      mediaContent[mime] = {\n        ...mediaContent[mime],\n        examples,\n      };\n    }\n  } else if (xExample) {\n    mediaContent = { ...mediaContent };\n    for (const mime of Object.keys(xExample)) {\n      const example = xExample[mime];\n      mediaContent[mime] = {\n        ...mediaContent[mime],\n        example,\n      };\n    }\n  }\n\n  return mediaContent;\n}\n"
  },
  {
    "path": "src/utils/sort.ts",
    "content": "/**\n * Function that returns a comparator for sorting objects by some specific key alphabetically.\n *\n * @param {String} property key of the object to sort, if starts from `-` - reverse\n */\nexport function alphabeticallyByProp<T>(property: string): (a: T, b: T) => number {\n  let sortOrder = 1;\n\n  if (property[0] === '-') {\n    sortOrder = -1;\n    property = property.substr(1);\n  }\n\n  return (a: T, b: T) => {\n    if (sortOrder == -1) {\n      return b[property].localeCompare(a[property]);\n    } else {\n      return a[property].localeCompare(b[property]);\n    }\n  };\n}\n"
  },
  {
    "path": "src/utils/test-utils.ts",
    "content": "import { objectHas, objectSet } from './object';\n\nfunction traverseComponent(root, fn) {\n  if (!root) {\n    return;\n  }\n\n  fn(root);\n\n  if (root.children) {\n    for (const child of root.children) {\n      traverseComponent(child, fn);\n    }\n  }\n}\n\nexport function filterPropsDeep<T extends object>(component: T, paths: string[]): T {\n  traverseComponent(component, comp => {\n    if (comp.props) {\n      for (const path of paths) {\n        if (objectHas(comp.props, path)) {\n          objectSet(comp.props, path, '<<<filtered>>>');\n        }\n      }\n    }\n  });\n\n  return component;\n}\n"
  },
  {
    "path": "tsconfig.json",
    "content": "{\n  \"compilerOptions\": {\n    \"experimentalDecorators\": true,\n    \"moduleResolution\": \"node\",\n    \"target\": \"es5\",\n    \"noImplicitAny\": false,\n    \"noUnusedParameters\": true,\n    \"noUnusedLocals\": true,\n    \"strictNullChecks\": true,\n    \"sourceMap\": true,\n    \"declaration\": true,\n    \"noEmitHelpers\": true,\n    \"importHelpers\": true,\n    \"outDir\": \"lib\",\n    \"pretty\": true,\n    \"lib\": [\"es2015\", \"es2016\", \"es2017\", \"dom\", \"WebWorker.ImportScripts\"],\n    \"jsx\": \"react\",\n    \"types\": [\"webpack\", \"webpack-env\", \"jest\"]\n  },\n  \"compileOnSave\": false,\n  \"exclude\": [\"node_modules\", \".tmp\", \"lib\", \"e2e/**\"],\n  \"include\": [\n    \"./custom.d.ts\",\n    \"./demo/playground/hmr-playground.tsx\",\n    \"./src/**/*.ts?\",\n    \"demo/*.tsx\",\n    \"src/empty.js\"\n  ]\n}\n"
  },
  {
    "path": "tsconfig.lib.json",
    "content": "{\n  \"extends\": \"./tsconfig.json\",\n  \"compilerOptions\": {\n    \"declarationDir\": \"typings\",\n    \"skipLibCheck\": true\n  },\n  \"include\": [\n    \"./custom.d.ts\",\n    \"src/index.ts\"\n  ]\n}\n"
  },
  {
    "path": "tslint.json",
    "content": "{\n  \"extends\": [\"tslint:latest\", \"tslint-react\"],\n  \"rules\": {\n    \"array-type\": false,\n    \"interface-name\": false,\n    \"object-literal-sort-keys\": false,\n    \"jsx-no-multiline-js\": false,\n    \"jsx-wrap-multiline\": false,\n    \"max-classes-per-file\": false,\n    \"forin\": false,\n    \"prefer-conditional-expression\": false,\n    \"no-var-requires\": false,\n    \"no-object-literal-type-assertion\": false,\n    \"no-console\": false,\n    \"jsx-curly-spacing\": false,\n    \"max-line-length\": false,\n\n    \"quotemark\": [true, \"single\", \"avoid-template\", \"jsx-double\"],\n    \"variable-name\": [true, \"ban-keywords\", \"check-format\", \"allow-leading-underscore\", \"allow-pascal-case\"],\n    \"arrow-parens\": [true, \"ban-single-arg-parens\"],\n    \"no-submodule-imports\": [true, \"prismjs\", \"perfect-scrollbar\", \"react-dom\", \"core-js\", \"memoize-one\"],\n    \"object-literal-key-quotes\": [true, \"as-needed\"],\n    \"no-unused-expression\": [true, \"allow-tagged-template\"],\n    \"semicolon\": [true, \"always\", \"ignore-bound-class-methods\"],\n    \"member-access\": [true, \"no-public\"]\n  }\n}\n"
  },
  {
    "path": "typings/styled-patch.d.ts",
    "content": "import * as styledComponents from 'styled-components';\n\n// FIXME\ndeclare module 'styled-components' {\n  interface ThemedStyledComponentsModule<T> {\n    keyframes(\n      strings: TemplateStringsArray | string[],\n      ...interpolations: SimpleInterpolation[]\n    ): Keyframes;\n  }\n\n  export interface BaseThemedCssFunction<T extends object> {\n    <P extends object>(\n      first:\n        | TemplateStringsArray\n        | CSSObject\n        | InterpolationFunction<ThemedStyledProps<P, T>>\n        | string[],\n      ...interpolations: Array<Interpolation<ThemedStyledProps<P, T>>>\n    ): FlattenInterpolation<ThemedStyledProps<P, T>>;\n  }\n}\n"
  },
  {
    "path": "webpack.config.ts",
    "content": "/* tslint:disable:no-implicit-dependencies */\nimport ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');\nimport * as webpack from 'webpack';\nimport * as path from 'path';\nimport { webpackIgnore } from './config/webpack-utils';\n\nconst nodeExternals = require('webpack-node-externals')({\n  // bundle in modules that need transpiling + non-js (e.g. css)\n  allowlist: [\n    'swagger2openapi',\n    'marked',\n    /reftools/,\n    'oas-resolver',\n    'oas-kit-common',\n    'oas-schema-walker',\n    /\\.(?!(?:jsx?|json)$).{1,5}$/i,\n  ],\n});\n\nconst VERSION = JSON.stringify(require('./package.json').version);\nlet REVISION;\n\ntry {\n  REVISION = JSON.stringify(\n    require('child_process').execSync('git rev-parse --short HEAD').toString().trim(),\n  );\n} catch (e) {\n  console.error('Skipping REDOC_REVISION');\n}\n\nconst BANNER = `ReDoc - OpenAPI/Swagger-generated API Reference Documentation\n-------------------------------------------------------------\n  Version: ${VERSION}\n  Repo: https://github.com/Redocly/redoc`;\n\nexport default (env: { standalone?: boolean; browser?: boolean } = {}) => ({\n  entry: env.standalone ? ['./src/polyfills.ts', './src/standalone.tsx'] : './src/index.ts',\n  output: {\n    filename: env.standalone\n      ? 'redoc.standalone.js'\n      : env.browser\n      ? 'redoc.browser.lib.js'\n      : 'redoc.lib.js',\n    path: path.join(__dirname, '/bundles'),\n    library: 'Redoc',\n    libraryTarget: 'umd',\n    globalObject: 'this',\n  },\n  devtool: 'source-map',\n  resolve: {\n    extensions: ['.ts', '.tsx', '.js', '.mjs', '.json'],\n    fallback: {\n      path: require.resolve('path-browserify'),\n      buffer: require.resolve('buffer'),\n      http: false,\n      fs: path.resolve(__dirname, 'src/empty.js'),\n      os: path.resolve(__dirname, 'src/empty.js'),\n      tty: path.resolve(__dirname, 'src/empty.js'),\n      url: require.resolve('url/'),\n    },\n  },\n  performance: false,\n  externalsPresets: env.standalone || env.browser ? {} : { node: true },\n  externals: env.standalone\n    ? {\n        esprima: 'null',\n        'node-fetch': 'null',\n        'node-fetch-h2': 'null',\n        yaml: 'null',\n        url: 'null',\n        'safe-json-stringify': 'null',\n      }\n    : (context, request, callback) => {\n        // ignore node-fetch dep of swagger2openapi as it is not used\n        if (/esprima|node-fetch|node-fetch-h2|\\/yaml|safe-json-stringify|url$/i.test(request)) {\n          return callback(null, 'var undefined');\n        }\n        return nodeExternals(context, request, callback);\n      },\n\n  module: {\n    rules: [\n      {\n        test: /\\.(tsx?|[cm]?js)$/,\n        loader: 'esbuild-loader',\n        options: {\n          target: 'es2015',\n          tsconfigRaw: require('./tsconfig.json'),\n        },\n        exclude: [/node_modules/],\n      },\n      {\n        test: /\\.css$/,\n        use: [\n          'style-loader',\n          'css-loader',\n          {\n            loader: 'esbuild-loader',\n            options: {\n              minify: true,\n            },\n          },\n        ],\n      },\n    ],\n  },\n  plugins: [\n    new webpack.DefinePlugin({\n      __REDOC_VERSION__: VERSION,\n      __REDOC_REVISION__: REVISION,\n      'process.env': '{}',\n      'process.platform': '\"browser\"',\n      'process.stdout': 'null',\n    }),\n    new ForkTsCheckerWebpackPlugin({ logger: { infrastructure: 'silent', issues: 'console' } }),\n    new webpack.BannerPlugin(BANNER),\n    new webpack.ProvidePlugin({\n      Buffer: ['buffer', 'Buffer'],\n    }),\n    webpackIgnore(/js-yaml\\/dumper\\.js$/),\n    env.standalone ? webpackIgnore(/^\\.\\/SearchWorker\\.worker$/) : undefined,\n  ].filter(Boolean),\n});\n"
  }
]